mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-05-23 08:32:45 -05:00
[PR #7047] [MERGED] Fix logout push identifiers and send logout before clearing devices #12769
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/7047
Author: @qaz741wsd856
Created: 4/1/2026
Status: ✅ Merged
Merged: 4/5/2026
Merged by: @dani-garcia
Base:
main← Head:fix-logout-push📝 Commits (4)
235c4caFix logout push identifiers and send logout before clearing devices1b174b9Merge branch 'main' into fix-logout-push17bb86dRefactor logout function parameters295a454Fix parameters in logout notification functions📊 Changes
4 files changed (+15 additions, -14 deletions)
View changed files
📝
src/api/admin.rs(+2 -1)📝
src/api/core/accounts.rs(+5 -4)📝
src/api/notifications.rs(+4 -3)📝
src/api/push.rs(+4 -6)📄 Description
This fixes two issues in the logout push flow.
push_logout()currently sends the acting device UUID in bothdeviceIdandidentifier. That does not match the other push entry points, wheredeviceIdis the push UUID andidentifieris the device UUID.post_sstamp()anddisable_user()delete all devices before callingsend_logout(). Sincecheck_user_has_push_device()filter was introduced in #3578, those flows will always skip the push because the device lookup returnsfalseafter the delete.This patch:
Devicethroughsend_logout()intopush_logout()deviceId = device.push_uuidandidentifier = device.uuidDevice::delete_all_by_user()inpost_sstamp()anddisable_user()to after logout sendingdeauth_user()unchanged, because it already sends the logout notification before deleting devices🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.