提交 9f525316 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-5613 --resolve only alphanumeric plus - _ . are now allowed

上级 90682d03
...@@ -2946,8 +2946,9 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag) ...@@ -2946,8 +2946,9 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
sofia_gateway_t *gateway; sofia_gateway_t *gateway;
char *pkey = switch_mprintf("%s::%s", profile->name, name); char *pkey = switch_mprintf("%s::%s", profile->name, name);
if (zstr(name)) { if (zstr(name) || switch_regex_match(name, "^[\\w\\.\\-\\_]+$") != SWITCH_STATUS_SUCCESS) {
name = "anonymous"; switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Ignoring invalid name '%s'\n", name ? name : "NULL");
goto skip;
} }
switch_mutex_lock(mod_sofia_globals.hash_mutex); switch_mutex_lock(mod_sofia_globals.hash_mutex);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论