We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b4cc0c commit 69346a8Copy full SHA for 69346a8
server/plugins-available/nginx_plugin.inc.php
@@ -2862,10 +2862,10 @@ private function nginx_replace($matches){
2862
return $location;
2863
}
2864
2865
- private function nginx_merge_locations($vhost_conf){
2866
- global $app, $conf;
+ private function nginx_merge_locations($vhost_conf) {
+ global $app, $conf;
2867
2868
- if(preg_match('/##subroot (.+) ##/', $vhost_conf, $subroot)) {
+ if(preg_match('/##subroot (.+?)\s*##/', $vhost_conf, $subroot)) {
2869
if(!preg_match('/^(?:[a-z0-9\/_-]|\.(?!\.))+$/iD', $subroot[1])) {
2870
$app->log('Token ##subroot is unsecure (server ID: '.$conf['server_id'].').', LOGLEVEL_WARN);
2871
} else {
0 commit comments