summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2019-02-10 18:18:31 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2019-02-10 20:47:19 -0500
commitb2c18f480d1d69192991cc334298ec1f7e1039b7 (patch)
treead59af1ab86e1c818d2d2fd63c2aa7cfe4795f1c
parent25bb4406faffaddb81e6a21deeb3f8a6243d40d2 (diff)
downloadlighttpd1.4-b2c18f480d1d69192991cc334298ec1f7e1039b7.tar.gz
lighttpd1.4-b2c18f480d1d69192991cc334298ec1f7e1039b7.zip
[mod_auth] minor: adjust config validation
x-ref: "PVS-Studio Analysis Results" https://redmine.lighttpd.net/boards/3/topics/8459 http://www.fly-server.ru/pvs-studio/lighttpd/
-rw-r--r--src/mod_auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mod_auth.c b/src/mod_auth.c
index 977b5c2d..a0f3d816 100644
--- a/src/mod_auth.c
+++ b/src/mod_auth.c
@@ -138,7 +138,7 @@ static int mod_auth_require_parse (server *srv, http_auth_require_t * const requ
"error value:", b, "error near:", str);
return 0;
}
- if (p-1 == eq) {
+ if (eq[1] == '|' || eq[1] == '\0') {
log_error_write(srv, __FILE__, __LINE__, "sssbss",
"error parsing auth.require 'require' field: missing token after '='",
"(expecting \"valid-user\" or \"user=a|user=b|group=g|host=h\").",