diff options
author | Ben Ford <bford@digium.com> | 2017-11-01 11:12:45 -0500 |
---|---|---|
committer | Ben Ford <bford@digium.com> | 2017-11-02 11:48:05 -0500 |
commit | ffcb7e2a2540181ea41062ca0e1bc3e4fed9b3a5 (patch) | |
tree | 2f2c793be35f7073f5da92ed95e7e92916d72565 /res/res_pjsip/pjsip_configuration.c | |
parent | a7c00707a596d1254eab56e7f4162f78a176b42a (diff) |
res_pjsip: Add to list of valid characters for from_user.
Fixes a regression where some characters were unable to be used in
the from_user field of an endpoint. Additionally, the backtick was
removed from the list of valid characters, since it is not valid,
and it was replaced with a single quote, which is a valid character.
ASTERISK-27387
Change-Id: Id80c10a644508365c87b3182e99ea49da11b0281
Diffstat (limited to 'res/res_pjsip/pjsip_configuration.c')
-rw-r--r-- | res/res_pjsip/pjsip_configuration.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c index 629e85b9b..e000039d2 100644 --- a/res/res_pjsip/pjsip_configuration.c +++ b/res/res_pjsip/pjsip_configuration.c @@ -1142,11 +1142,11 @@ static int from_user_handler(const struct aco_option *opt, { struct ast_sip_endpoint *endpoint = obj; /* Valid non-alphanumeric characters for URI */ - char *valid_uri_marks = "-_.!~*`()"; + char *valid_uri_marks = "-._~%!$&'()*+,;=:"; const char *val; for (val = var->value; *val; val++) { - if (!strchr(valid_uri_marks, *val) && !isdigit(*val) && !isalpha(*val)) { + if (!isalpha(*val) && !isdigit(*val) && !strchr(valid_uri_marks, *val)) { ast_log(LOG_ERROR, "Error configuring endpoint '%s' - '%s' field " "contains invalid character '%c'\n", ast_sorcery_object_get_id(endpoint), var->name, *val); |