diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-11-09 18:55:28 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-11-09 18:55:28 +0000 |
commit | 44da6400cde94d6b3cb7581cf474282ea1bcafd3 (patch) | |
tree | 18c345fbf988ba21ec3517038ceb28f7b6ea2209 /package/uhttpd/src | |
parent | d9aa1e3c1b3d849153caf2a32ceaaf04f10ecc71 (diff) | |
download | mtk-20170518-44da6400cde94d6b3cb7581cf474282ea1bcafd3.zip mtk-20170518-44da6400cde94d6b3cb7581cf474282ea1bcafd3.tar.gz mtk-20170518-44da6400cde94d6b3cb7581cf474282ea1bcafd3.tar.bz2 |
uhttpd: cope with DES crypted passwd entries by not relying on a leading dollar sign to indicate a cipher
SVN-Revision: 28886
Diffstat (limited to 'package/uhttpd/src')
-rw-r--r-- | package/uhttpd/src/uhttpd-utils.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/package/uhttpd/src/uhttpd-utils.c b/package/uhttpd/src/uhttpd-utils.c index d48f6bc..a47f175 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; } } |