summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2017-09-21 01:03:14 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2017-09-21 01:03:14 -0400
commit17373221b8b52e3d087f2655517f5340050e4c71 (patch)
treedf709199f55aeb7ba4a92ed8fd454d779a9ec2c7
parent6e171bd4b98128e215ad8f13702bd1183cb30edb (diff)
downloadlighttpd1.4-17373221b8b52e3d087f2655517f5340050e4c71.tar.gz
lighttpd1.4-17373221b8b52e3d087f2655517f5340050e4c71.zip
[mod_wstunnel] fix config parsing bug
fix logic inversion when validating values in wstunnel.origins (thx nicorac) x-ref: "https://redmine.lighttpd.net/boards/2/topics/7600"
-rw-r--r--src/mod_wstunnel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mod_wstunnel.c b/src/mod_wstunnel.c
index fa7ea5dd..89cd6a23 100644
--- a/src/mod_wstunnel.c
+++ b/src/mod_wstunnel.c
@@ -259,7 +259,8 @@ SETDEFAULTS_FUNC(mod_wstunnel_set_defaults) {
}
/* error if "mode" = "authorizer"; wstunnel can not act as authorizer */
- if (s->gw.exts_auth->used) { /*(check after gw_set_defaults_backend())*/
+ /*(check after gw_set_defaults_backend())*/
+ if (s->gw.exts_auth && s->gw.exts_auth->used) {
log_error_write(srv, __FILE__, __LINE__, "s",
"wstunnel.server must not define any hosts "
"with attribute \"mode\" = \"authorizer\"");
@@ -273,7 +274,7 @@ SETDEFAULTS_FUNC(mod_wstunnel_set_defaults) {
buffer_reset(s->frame_type);
}
- if (array_is_vlist(s->origins)) {
+ if (!array_is_vlist(s->origins)) {
log_error_write(srv, __FILE__, __LINE__, "s",
"unexpected value for wstunnel.origins; expected wstunnel.origins = ( \"...\", \"...\" )");
return HANDLER_ERROR;