Skip to content

Commit d3a2800

Browse files
committed
Guard against empty endpoint
1 parent a366683 commit d3a2800

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ucp/controller/webpush.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ public function unsubscribe(symfony_request $symfony_request): JsonResponse
458458

459459
$data = json_sanitizer::decode($symfony_request->get('data', ''));
460460

461-
$endpoint = $data['endpoint'];
461+
$endpoint = is_string($data['endpoint'] ?? null) ? $data['endpoint'] : '';
462462

463463
$sql = 'DELETE FROM ' . $this->push_subscriptions_table . '
464464
WHERE user_id = ' . (int) $this->user->id() . "

0 commit comments

Comments
 (0)