mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-11 01:10:09 +03:00
[PR #3578] [MERGED] Add mobile push device filter to non-null push uuid #2973
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/3578
Author: @quexten
Created: 6/13/2023
Status: ✅ Merged
Merged: 6/18/2023
Merged by: @BlackDex
Base:
main← Head:fix/mobile-push-to-empty-uuid📝 Commits (1)
e460643Fix mobile push blocking requests and spamming push server📊 Changes
7 files changed (+146 additions, -100 deletions)
View changed files
📝
src/api/admin.rs(+3 -3)📝
src/api/core/accounts.rs(+5 -5)📝
src/api/core/organizations.rs(+1 -1)📝
src/api/core/sends.rs(+66 -16)📝
src/api/notifications.rs(+12 -5)📝
src/api/push.rs(+46 -69)📝
src/db/models/device.rs(+13 -1)📄 Description
Partially fixes #3577.
Over time, old devices accumulate in the SQL device table. Even when the device push uuid is NULL, a push request is sent for them when mobile push is active. For my server, this lead to ~100 requests to the Bitwarden push servers without a single active mobile push client, and a request time of ~15 seconds.
This requests adds a filter to prevent mobile push notifications from being sent to clients who did not even register for mobile push.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.