[asterisk-commits] res pjsip/pjsip configuration: Disregard empty auth values (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Aug 24 13:59:32 CDT 2015
Joshua Colp has submitted this change and it was merged.
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(-)
Approvals:
Anonymous Coward #1000019: Verified
Ashley Sanders: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
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: merged
Gerrit-Change-Id: Ic32b0c6eb5575107d5164a8c40099e687cd722c7
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
More information about the asterisk-commits
mailing list