From 17373221b8b52e3d087f2655517f5340050e4c71 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Thu, 21 Sep 2017 01:03:14 -0400 Subject: [PATCH] [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" --- src/mod_wstunnel.c | 5 +++-- 1 file 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;