diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index dd680380c916d1b7345f34a8a4c28d1c23069ee6..bcacdcab995c3aed51a2ccafb4cb7e690b82bce2 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -2862,10 +2862,10 @@ class nginx_plugin { return $location; } - private function nginx_merge_locations($vhost_conf){ - global $app, $conf; + private function nginx_merge_locations($vhost_conf) { + global $app, $conf; - if(preg_match('/##subroot (.+) ##/', $vhost_conf, $subroot)) { + if(preg_match('/##subroot (.+?)\s*##/', $vhost_conf, $subroot)) { if(!preg_match('/^(?:[a-z0-9\/_-]|\.(?!\.))+$/iD', $subroot[1])) { $app->log('Token ##subroot is unsecure (server ID: '.$conf['server_id'].').', LOGLEVEL_WARN); } else {