Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ai
sso
Commits
8e5900a2
Commit
8e5900a2
authored
Aug 12, 2013
by
ale
Browse files
remove unused base64 methods from mod_sso/sso_utils
parent
b5ec86fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/mod_sso/mod_sso.h
View file @
8e5900a2
...
@@ -50,7 +50,6 @@ typedef map<string, string> params_t;
...
@@ -50,7 +50,6 @@ typedef map<string, string> params_t;
void
debug
(
const
string
&
s
);
void
debug
(
const
string
&
s
);
string
url_decode
(
const
string
&
str
);
string
url_decode
(
const
string
&
str
);
string
url_encode
(
const
string
&
str
);
string
url_encode
(
const
string
&
str
);
string
base64_decode
(
const
string
&
str
);
params_t
parse_query_string
(
const
string
&
str
);
params_t
parse_query_string
(
const
string
&
str
);
void
make_cookie_value
(
string
&
cookie_value
,
const
string
&
name
,
void
make_cookie_value
(
string
&
cookie_value
,
const
string
&
name
,
const
string
&
session_id
,
const
string
&
path
,
const
string
&
session_id
,
const
string
&
path
,
...
...
src/mod_sso/sso_utils.cc
View file @
8e5900a2
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
#include
"http_protocol.h"
#include
"http_protocol.h"
#include
"http_main.h"
#include
"http_main.h"
#include
"ap_config.h"
#include
"ap_config.h"
#include
"apr_base64.h"
#include
"mod_sso.h"
#include
"mod_sso.h"
namespace
modsso
{
namespace
modsso
{
...
@@ -114,13 +113,6 @@ string url_encode(const string& str) {
...
@@ -114,13 +113,6 @@ string url_encode(const string& str) {
return
out
;
return
out
;
}
}
string
base64_decode
(
const
string
&
str
)
{
char
buf
[
apr_base64_decode_len
(
str
.
c_str
())
+
1
];
int
n
=
apr_base64_decode
(
buf
,
str
.
c_str
());
string
out
(
buf
,
n
);
return
out
;
}
params_t
parse_query_string
(
const
string
&
str
)
{
params_t
parse_query_string
(
const
string
&
str
)
{
params_t
p
;
params_t
p
;
if
(
str
.
size
()
==
0
)
return
p
;
if
(
str
.
size
()
==
0
)
return
p
;
...
...
src/mod_sso/test/sso_utils_unittest.cc
View file @
8e5900a2
...
@@ -38,13 +38,6 @@ TEST_F(SSOUtilsTest, UrlEncode) {
...
@@ -38,13 +38,6 @@ TEST_F(SSOUtilsTest, UrlEncode) {
EXPECT_EQ
(
reference
,
result
);
EXPECT_EQ
(
reference
,
result
);
}
}
TEST_F
(
SSOUtilsTest
,
Base64Decode
)
{
string
reference
(
"just|an|example"
),
sample
(
"anVzdHxhbnxleGFtcGxl"
);
string
result
=
modsso
::
base64_decode
(
sample
);
ASSERT_EQ
(
reference
,
result
);
}
TEST_F
(
SSOUtilsTest
,
ParseQueryString
)
{
TEST_F
(
SSOUtilsTest
,
ParseQueryString
)
{
modsso
::
params_t
parms
;
modsso
::
params_t
parms
;
parms
=
modsso
::
parse_query_string
(
"key1=val1&key%32=%76%61%6C2"
);
parms
=
modsso
::
parse_query_string
(
"key1=val1&key%32=%76%61%6C2"
);
...
...
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