Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
5ebcb51f
Commit
5ebcb51f
authored
Apr 02, 2003
by
Andy Cedilnik
Browse files
Url escape password
parent
b60c9ae0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Source/cmCTest.cxx
View file @
5ebcb51f
...
...
@@ -188,6 +188,33 @@ std::string cmCTest::MakeXMLSafe(const std::string& str)
return
ost
.
str
();
}
std
::
string
cmCTest
::
MakeURLSafe
(
const
std
::
string
&
str
)
{
std
::
string
::
size_type
pos
=
0
;
cmOStringStream
ost
;
char
buffer
[
10
];
for
(
pos
=
0
;
pos
<
str
.
size
();
pos
++
)
{
unsigned
char
ch
=
str
[
pos
];
if
(
(
ch
>
126
||
ch
<
32
||
ch
==
'&'
||
ch
==
'%'
||
ch
==
'+'
||
ch
==
'='
||
ch
==
'@'
)
&&
ch
!=
9
)
{
sprintf
(
buffer
,
"%02x;"
,
(
unsigned
int
)
ch
);
ost
<<
buffer
;
}
else
{
ost
<<
ch
;
}
}
return
ost
.
str
();
}
bool
TryExecutable
(
const
char
*
dir
,
const
char
*
file
,
std
::
string
*
fullPath
,
const
char
*
subdir
)
{
...
...
@@ -1831,10 +1858,10 @@ int cmCTest::SubmitResults()
{
std
::
cout
<<
"FTP submit method"
<<
std
::
endl
;
std
::
string
url
=
"ftp://"
;
url
+=
m_DartConfiguration
[
"DropSiteUser"
]
+
":"
+
m_DartConfiguration
[
"DropSitePassword"
]
+
"@"
+
url
+=
cmCTest
::
MakeURLSafe
(
m_DartConfiguration
[
"DropSiteUser"
]
)
+
":"
+
cmCTest
::
MakeURLSafe
(
m_DartConfiguration
[
"DropSitePassword"
]
)
+
"@"
+
m_DartConfiguration
[
"DropSite"
]
+
m_DartConfiguration
[
"DropLocation"
];
cmCTest
::
MakeURLSafe
(
m_DartConfiguration
[
"DropLocation"
]
)
;
if
(
!
submit
.
SubmitUsingFTP
(
m_ToplevelPath
+
"/Testing/"
+
m_CurrentTag
,
files
,
prefix
,
url
)
)
{
...
...
Source/cmCTest.h
View file @
5ebcb51f
...
...
@@ -216,6 +216,7 @@ private:
bool
OpenOutputFile
(
const
std
::
string
&
path
,
const
std
::
string
&
name
,
std
::
ofstream
&
stream
);
std
::
string
MakeXMLSafe
(
const
std
::
string
&
);
std
::
string
MakeURLSafe
(
const
std
::
string
&
);
};
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment