httpd: fix authentication
diff --git a/networking/httpd.c b/networking/httpd.c
index 382893b..9b4b717 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -2045,9 +2045,10 @@
#if ENABLE_FEATURE_HTTPD_BASIC_AUTH
/* Case: no "Authorization:" was seen, but page does require passwd.
* Check that with dummy user:pass */
- if ((authorized < 0) && check_user_passwd(urlcopy, ":") == 0) {
+ if (authorized < 0)
+ authorized = check_user_passwd(urlcopy, ":");
+ if (!authorized)
send_headers_and_exit(HTTP_UNAUTHORIZED);
- }
#endif
if (found_moved_temporarily) {