mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-24 02:39:18 -05:00
fix(webpush): add user ID validation to push subscription verification
Signed-off-by: 0xsysr3ll <0xsysr3ll@pm.me>
This commit is contained in:
@@ -86,6 +86,10 @@ export const verifyAndResubscribePushSubscription = async (
|
|||||||
userId: number | undefined,
|
userId: number | undefined,
|
||||||
currentSettings: PublicSettingsResponse
|
currentSettings: PublicSettingsResponse
|
||||||
): Promise<boolean> => {
|
): Promise<boolean> => {
|
||||||
|
if (!userId) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const isValid = await verifyPushSubscription(userId, currentSettings);
|
const isValid = await verifyPushSubscription(userId, currentSettings);
|
||||||
|
|
||||||
if (isValid) {
|
if (isValid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user