Merge "res_pjsip: Add to list of valid characters for from_user."
authorJoshua Colp <jcolp@digium.com>
Fri, 3 Nov 2017 14:06:47 +0000 (09:06 -0500)
committerGerrit Code Review <gerrit2@gerrit.digium.api>
Fri, 3 Nov 2017 14:06:47 +0000 (09:06 -0500)
res/res_pjsip/pjsip_configuration.c

index 6db5b38..269e03e 100644 (file)
@@ -1140,11 +1140,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);