2 Copyright (C) 2006 OpenWrt.org
4 Index: busybox-1.7.2/networking/httpd.c
5 ===================================================================
6 --- busybox-1.7.2.orig/networking/httpd.c 2007-10-30 15:34:59.000000000 -0500
7 +++ busybox-1.7.2/networking/httpd.c 2007-10-30 15:35:03.000000000 -0500
8 @@ -1527,12 +1527,26 @@
9 if (ENABLE_FEATURE_HTTPD_AUTH_MD5) {
13 + struct passwd *pwd = NULL;
15 if (strncmp(p, request, u - request) != 0) {
16 /* user doesn't match */
20 + if(pp && pp[1] == '$' && pp[2] == 'p' &&
21 + pp[3] == '$' && pp[4] &&
22 + (pwd = getpwnam(&pp[4])) != NULL) {
23 + if(pwd->pw_passwd && pwd->pw_passwd[0] == '!') {
27 + ppnew = xrealloc(ppnew, 5 + strlen(pwd->pw_passwd));
29 + strcpy(ppnew + 1, pwd->pw_passwd);
32 if (pp && pp[1] == '$' && pp[2] == '1'
33 && pp[3] == '$' && pp[4]
35 @@ -1543,6 +1557,10 @@
45 if (strcmp(p, request) == 0) {