mirror of
https://github.com/bitwarden/server
synced 2025-12-10 13:23:27 +00: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:
@@ -77,6 +77,9 @@ public class DeviceService : IDeviceService
|
|||||||
|
|
||||||
device.Active = false;
|
device.Active = false;
|
||||||
device.RevisionDate = DateTime.UtcNow;
|
device.RevisionDate = DateTime.UtcNow;
|
||||||
|
device.EncryptedPrivateKey = null;
|
||||||
|
device.EncryptedPublicKey = null;
|
||||||
|
device.EncryptedUserKey = null;
|
||||||
await _deviceRepository.UpsertAsync(device);
|
await _deviceRepository.UpsertAsync(device);
|
||||||
|
|
||||||
await _pushRegistrationService.DeleteRegistrationAsync(device.Id.ToString());
|
await _pushRegistrationService.DeleteRegistrationAsync(device.Id.ToString());
|
||||||
|
|||||||
Reference in New Issue
Block a user