Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
belle-sip
Commits
ad80b82e
Commit
ad80b82e
authored
Dec 16, 2013
by
jehan
Browse files
fix username chars to be escaped
parent
83e9325f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/belle_sip_utils.c
View file @
ad80b82e
...
...
@@ -829,8 +829,18 @@ static const char *get_uri_username_noescapes() {
static
char
noescapes
[
BELLE_SIP_NO_ESCAPES_SIZE
]
=
{
0
};
if
(
noescapes
[
BELLE_SIP_NO_ESCAPES_SIZE
-
1
]
==
0
)
{
// concurrent initialization should not be an issue
noescapes_add_list
(
noescapes
,
"[]/?:+$-_.!~*\()"
);
/*user = 1*( unreserved / escaped / user-unreserved )
unreserved = alphanum / mark
mark = "-" / "_" / "." / "!" / "~" / "*" / "'"
/ "(" / ")"
user-unreserved = "&" / "=" / "+" / "$" / "," / ";" / "?" / "/"
*/
noescapes_add_alfanums
(
noescapes
);
/*mark*/
noescapes_add_list
(
noescapes
,
"-_.!~*'()"
);
/*user-unreserved*/
noescapes_add_list
(
noescapes
,
"&=+$,;?/"
);
noescapes
[
BELLE_SIP_NO_ESCAPES_SIZE
-
1
]
=
1
;
// initialized
// print_noescapes_map(noescapes, "uri_username");
}
...
...
Write
Preview
Markdown
is supported
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