summaryrefslogtreecommitdiff
path: root/res/res_pjsip_outbound_registration.c
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2017-09-13 15:23:54 -0600
committerGeorge Joseph <gjoseph@digium.com>2017-09-14 14:18:42 -0500
commitd178f497d2657361374abaa92d517bcdc8a81f97 (patch)
treeb7a502bfc16f5deb470fdd0af2ee5a9a65566020 /res/res_pjsip_outbound_registration.c
parente9455d22646fbe9b54c08cd9f1824010cb71ec40 (diff)
res_pjsip: Filter out non SIP(S) requests
Incoming requests with non sip(s) URIs in the Request, To, From or Contact URIs are now rejected with PJSIP_SC_UNSUPPORTED_URI_SCHEME (416). This is performed in pjsip_message_filter (formerly pjsip_message_ip_updater) and is done at pjproject's "TRANSPORT" layer before a request can even reach the distributor. URIs read by res_pjsip_outbound_publish from pjsip.conf are now also checked for both length and sip(s) scheme. Those URIs read by outbound registration and aor were already being checked for scheme but their error messages needed to be updated to include scheme failure as well as length failure. Change-Id: Ibb2f9f1d2dc7549da562af4cbd9156c44ffdd460
Diffstat (limited to 'res/res_pjsip_outbound_registration.c')
-rw-r--r--res/res_pjsip_outbound_registration.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c
index bbb286acf..4697e5cf7 100644
--- a/res/res_pjsip_outbound_registration.c
+++ b/res/res_pjsip_outbound_registration.c
@@ -1428,7 +1428,7 @@ static int sip_outbound_registration_apply(const struct ast_sorcery *sorcery, vo
ast_sorcery_object_get_id(applied));
return -1;
} else if (ast_sip_validate_uri_length(applied->server_uri)) {
- ast_log(LOG_ERROR, "Server URI or hostname length exceeds pjpropject limit '%s'\n",
+ ast_log(LOG_ERROR, "Server URI or hostname length exceeds pjproject limit or is not a sip(s) uri: '%s'\n",
ast_sorcery_object_get_id(applied));
return -1;
} else if (ast_strlen_zero(applied->client_uri)) {
@@ -1436,7 +1436,7 @@ static int sip_outbound_registration_apply(const struct ast_sorcery *sorcery, vo
ast_sorcery_object_get_id(applied));
return -1;
} else if (ast_sip_validate_uri_length(applied->client_uri)) {
- ast_log(LOG_ERROR, "Client URI or hostname length exceeds pjpropject limit '%s'\n",
+ ast_log(LOG_ERROR, "Client URI or hostname length exceeds pjproject limit or is not a sip(s) uri: '%s'\n",
ast_sorcery_object_get_id(applied));
return -1;
} else if (applied->line && ast_strlen_zero(applied->endpoint)) {