[asterisk-commits] file: trunk r393857 - /trunk/res/res_sip/config_auth.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jul 8 16:26:39 CDT 2013
Author: file
Date: Mon Jul 8 16:26:37 2013
New Revision: 393857
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=393857
Log:
Treat the authentication object as invalid if digest configuration is chosen and the digest is not of the correct length.
(closes issue ASTERISK-22003)
Reported by: Rusty Newton
Modified:
trunk/res/res_sip/config_auth.c
Modified: trunk/res/res_sip/config_auth.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_sip/config_auth.c?view=diff&rev=393857&r1=393856&r2=393857
==============================================================================
--- trunk/res/res_sip/config_auth.c (original)
+++ trunk/res/res_sip/config_auth.c Mon Jul 8 16:26:37 2013
@@ -85,6 +85,11 @@
ast_log(LOG_ERROR, "'md5' authentication specified but no md5_cred"
"specified for auth '%s'\n", ast_sorcery_object_get_id(auth));
res = -1;
+ } else if (strlen(auth->md5_creds) != PJSIP_MD5STRLEN) {
+ ast_log(LOG_ERROR, "'md5' authentication requires digest of '%d', but"
+ "digest is of '%d' for auth '%s'\n", PJSIP_MD5STRLEN, (int)strlen(auth->md5_creds),
+ ast_sorcery_object_get_id(auth));
+ res = -1;
}
break;
case AST_SIP_AUTH_TYPE_ARTIFICIAL:
More information about the asterisk-commits
mailing list