X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/b092b4323d03b18ee2213d22274a73b1bd14d595..d8e37c68cc8a8d8888900b35f679bc79b01735e6:/package/uhttpd/src/uhttpd-utils.c diff --git a/package/uhttpd/src/uhttpd-utils.c b/package/uhttpd/src/uhttpd-utils.c index 96c0b82cd..caa6b12bc 100644 --- a/package/uhttpd/src/uhttpd-utils.c +++ b/package/uhttpd/src/uhttpd-utils.c @@ -622,10 +622,14 @@ struct auth_realm * uh_auth_add(char *path, char *user, char *pass) min(strlen(pass), sizeof(new->pass) - 1)); } - uh_realm_count++; + if( new->pass[0] ) + { + uh_realm_count++; + return new; + } } - return new; + return NULL; } int uh_auth_check(