diff --git a/lib/Controller/PushController.php b/lib/Controller/PushController.php index 8d86d8123..6693aaedf 100644 --- a/lib/Controller/PushController.php +++ b/lib/Controller/PushController.php @@ -100,7 +100,7 @@ public function registerDevice(string $pushTokenHash, string $devicePublicKey, s if ( !filter_var($proxyServer, FILTER_VALIDATE_URL) || \strlen($proxyServer) > 256 || - !preg_match('/^(https\:\/\/|http\:\/\/localhost(\:\d{0,5})?\/)/', $proxyServer) + !preg_match('/^(https\:\/\/|http\:\/\/(localhost|[a-z0-9\.-]*\.(internal|local))(\:\d{0,5})?\/)/', $proxyServer) ) { return new DataResponse(['message' => 'INVALID_PROXY_SERVER'], Http::STATUS_BAD_REQUEST); }