[Asterisk-code-review] res pjsip/pjsip configuration: Disregard empty auth values (asterisk[master])
Matt Jordan
asteriskteam at digium.com
Sun Aug 23 18:43:56 CDT 2015
Matt Jordan has uploaded a new change for review.
https://gerrit.asterisk.org/1129
Change subject: res_pjsip/pjsip_configuration: Disregard empty auth values
......................................................................
res_pjsip/pjsip_configuration: Disregard empty auth values
When an endpoint is backed by a non-static conf file backend (such as
the AstDB or Realtime), the 'auth' object may be returned as being an
empty string. Currently, res_pjsip will interpret that as being a valid
auth object, and will attempt to authenticate inbound requests. This
isn't desired; is an auth value is empty (which the name of an auth
object cannot be), we should instead interpret that as being an invalid
auth object and skip it.
ASTERISK-25339 #close
Change-Id: Ic32b0c6eb5575107d5164a8c40099e687cd722c7
---
M res/res_pjsip/pjsip_configuration.c
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/29/1129/1
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 64ffe15..cfb17cd 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -402,6 +402,10 @@
}
while ((val = strsep(&auth_names, ","))) {
+ if (ast_strlen_zero(val)) {
+ continue;
+ }
+
val = ast_strdup(val);
if (!val) {
goto failure;
--
To view, visit https://gerrit.asterisk.org/1129
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic32b0c6eb5575107d5164a8c40099e687cd722c7
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
More information about the asterisk-code-review
mailing list