summaryrefslogtreecommitdiff
path: root/package/uhttpd/src
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-11-09 18:55:28 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-11-09 18:55:28 +0000
commit81199b8bf5677009fc0a13538c9e00707c24af5a (patch)
tree3b24a036f6ca73de1a17a364369cd967e40dee31 /package/uhttpd/src
parentb0ee088651b3248b554d4e1c5a0c018e60c10674 (diff)
[package] uhttpd: cope with DES crypted passwd entries by not relying on a leading dollar sign to indicate a cipher
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28886 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/uhttpd/src')
-rw-r--r--package/uhttpd/src/uhttpd-utils.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/package/uhttpd/src/uhttpd-utils.c b/package/uhttpd/src/uhttpd-utils.c
index d48f6bcf11..a47f175ba6 100644
--- a/package/uhttpd/src/uhttpd-utils.c
+++ b/package/uhttpd/src/uhttpd-utils.c
@@ -782,12 +782,9 @@ int uh_auth_check(
/* found a realm matching the username */
if( realm )
{
- /* is a crypt passwd */
- if( realm->pass[0] == '$' )
- pass = crypt(pass, realm->pass);
-
/* check user pass */
- if( !strcmp(pass, realm->pass) )
+ if (!strcmp(pass, realm->pass) ||
+ !strcmp(crypt(pass, realm->pass), realm->pass))
return 1;
}
}