We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 50fa2c0 commit e645b4aCopy full SHA for e645b4a
ucp/controller/webpush.php
@@ -309,6 +309,8 @@ public function is_valid_endpoint(string $endpoint): bool
309
return false;
310
}
311
312
+ $host = strtolower($host);
313
+
314
if (in_array($host, self::PUSH_SERVICE_WHITELIST, true))
315
{
316
return true;
@@ -358,6 +360,8 @@ public function subscribe(symfony_request $symfony_request): JsonResponse
358
360
359
361
$data = json_sanitizer::decode($symfony_request->get('data', ''));
362
363
+ $data['endpoint'] = $data['endpoint'] ?? '';
364
365
if (!$this->is_valid_endpoint($data['endpoint']))
366
367
throw new http_exception(Response::HTTP_BAD_REQUEST, 'WEBPUSH_INVALID_ENDPOINT');
0 commit comments