Commit ad80b82e authored by jehan's avatar jehan

fix username chars to be escaped

parent 83e9325f
......@@ -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");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment