summaryrefslogtreecommitdiff
path: root/uhttpd-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'uhttpd-utils.c')
-rw-r--r--uhttpd-utils.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/uhttpd-utils.c b/uhttpd-utils.c
index d48f6bc..a47f175 100644
--- a/uhttpd-utils.c
+++ b/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;
}
}