X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=auth.c;h=0c4872fe3ed8077e5838d72f9f4c285680a97623;hb=ac7670faba12e23b8ec7e866dcfe1d98d3921b40;hp=e1b157518886264b330ee5254e58a3c1fcd0e4a3;hpb=1f4c517bb889413e55ccee466d9dfe79156092e8;p=project%2Fuhttpd.git diff --git a/auth.c b/auth.c index e1b1575..0c4872f 100644 --- a/auth.c +++ b/auth.c @@ -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");