diff --git a/lib/Controller/ExAppProxyController.php b/lib/Controller/ExAppProxyController.php index 273d27a7..bd653857 100644 --- a/lib/Controller/ExAppProxyController.php +++ b/lib/Controller/ExAppProxyController.php @@ -236,9 +236,10 @@ private function prepareProxy( string $appId, string $other, array &$route, array &$bruteforceProtection, int &$delay ): ?ExApp { $delay = 0; - if (preg_match('#(?:^|/|%2[fF])(?:\.|%2[eE]){2}(?:/|%2[fF]|$)#', $other) === 1) { + // The forwarded path ends at "?" or "#", curl resolves dot segments, Tomcat drops ";" parameters first. + if (preg_match('#(?:^|/|%2[fF])(?:\.|%2[eE]){1,2}(?:[/;?\#]|%2[fF]|$)#', $other) === 1) { $this->logger->debug( - sprintf('Returning status 404 for "%s": path contains a parent-directory segment.', $other) + sprintf('Returning status 404 for "%s": path contains a dot segment.', $other) ); return null; }