aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-11-09 18:55:28 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-11-09 18:55:28 +0000
commitd405d062dc75a88535e901e255e38c8e730c8305 (patch)
tree3b24a036f6ca73de1a17a364369cd967e40dee31
parent6a95c084e960176ce8e8d57435a011c6c6fc59d7 (diff)
downloadupstream-d405d062dc75a88535e901e255e38c8e730c8305.tar.gz
upstream-d405d062dc75a88535e901e255e38c8e730c8305.tar.bz2
upstream-d405d062dc75a88535e901e255e38c8e730c8305.zip
[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
-rw-r--r--package/uhttpd/Makefile2
-rw-r--r--package/uhttpd/src/uhttpd-utils.c7
2 files changed, 3 insertions, 6 deletions
diff --git a/package/uhttpd/Makefile b/package/uhttpd/Makefile
index d8bd33c075..c333660d57 100644
--- a/package/uhttpd/Makefile
+++ b/package/uhttpd/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uhttpd
-PKG_RELEASE:=29
+PKG_RELEASE:=30
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_CONFIG_DEPENDS := \
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;
}
}