From 7c76eddee5f8aff54e1a73b3cf9b4f6273941462 Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Mon, 7 Apr 2025 14:35:27 +0200 Subject: [PATCH] [PM-19801] Clear device keys on deactivate (#5592) * Clear device keys on deactivate * Fix migration * Add newline * Remove inactive device migration --- src/Core/Services/Implementations/DeviceService.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Core/Services/Implementations/DeviceService.cs b/src/Core/Services/Implementations/DeviceService.cs index 99523d8e5e..165fab0237 100644 --- a/src/Core/Services/Implementations/DeviceService.cs +++ b/src/Core/Services/Implementations/DeviceService.cs @@ -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());