Skip to content

Commit

Permalink
Allow all internal hosts to be http-only
Browse files Browse the repository at this point in the history
Signed-off-by: jld3103 <jld3103yt@gmail.com>
  • Loading branch information
provokateurin committed Jul 21, 2022
1 parent 2e35a2e commit 74f1472
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Controller/PushController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 74f1472

Please sign in to comment.