1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-28 14:54:50 -05:00

[PM-19801] Clear device keys on deactivate (#5592)

* Clear device keys on deactivate

* Fix migration

* Add newline

* Remove inactive device migration
This commit is contained in:
Bernd Schoolmann 2025-04-07 14:35:27 +02:00 committed by GitHub
parent 1c6bac9dd5
commit 7c76eddee5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -77,6 +77,9 @@ public class DeviceService : IDeviceService
device.Active = false;
device.RevisionDate = DateTime.UtcNow;
device.EncryptedPrivateKey = null;
device.EncryptedPublicKey = null;
device.EncryptedUserKey = null;
await _deviceRepository.UpsertAsync(device);
await _pushRegistrationService.DeleteRegistrationAsync(device.Id.ToString());