[asterisk-commits] tilghman: trunk r98536 - /trunk/main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jan 12 12:12:57 CST 2008


Author: tilghman
Date: Sat Jan 12 12:12:56 2008
New Revision: 98536

URL: http://svn.digium.com/view/asterisk?view=rev&rev=98536
Log:
Conversion to load manager.conf into memory did not convert the password
functions correctly.  (Closes issue #11749)

Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svn.digium.com/view/asterisk/trunk/main/manager.c?view=diff&rev=98536&r1=98535&r2=98536
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Sat Jan 12 12:12:56 2008
@@ -997,8 +997,7 @@
 		ast_log(LOG_NOTICE, "%s failed to pass IP ACL as '%s'\n", ast_inet_ntoa(s->sin.sin_addr), username);
 	} else if (!strcasecmp(astman_get_header(m, "AuthType"), "MD5")) {
 		const char *key = astman_get_header(m, "Key");
-		if (!ast_strlen_zero(key) && !ast_strlen_zero(s->challenge) &&
-		    !ast_strlen_zero(password)) {
+		if (!ast_strlen_zero(key) && !ast_strlen_zero(s->challenge)) {
 			int x;
 			int len = 0;
 			char md5key[256] = "";
@@ -1007,7 +1006,7 @@
 
 			MD5Init(&md5);
 			MD5Update(&md5, (unsigned char *) s->challenge, strlen(s->challenge));
-			MD5Update(&md5, (unsigned char *) password, strlen(password));
+			MD5Update(&md5, (unsigned char *) user->secret, strlen(user->secret));
 			MD5Final(digest, &md5);
 			for (x=0; x<16; x++)
 				len += sprintf(md5key + len, "%2.2x", digest[x]);




More information about the asterisk-commits mailing list