diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-01-21 13:21:34 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-01-21 13:22:50 +0100 |
commit | 7bd66ddacb6b87a927b7846a44c02c0df7988c71 (patch) | |
tree | eb268b5eb0d52addd852f89f5a45b9474fecc5c0 | |
parent | 56278d4af64256e703a6c4cf3d854aac689c391c (diff) |
add missing check for unencrypted passwords
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r-- | auth.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -118,7 +118,9 @@ bool uh_auth_check(struct client *cl, struct path_info *pi) if (!req->realm) return true; - if (user_match && !strcmp(crypt(pass, realm->pass), realm->pass)) + if (user_match && + (!strcmp(pass, realm->pass) || + !strcmp(crypt(pass, realm->pass), realm->pass))) return true; uh_http_header(cl, 401, "Authorization Required"); |