mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 13:58:07 +01:00
Don't allow callers to unlink their primary device
This commit is contained in:
committed by
Jon Chambers
parent
845fc338d7
commit
2b764c2abd
@@ -141,6 +141,10 @@ public class DeviceController {
|
||||
throw new WebApplicationException(Response.Status.UNAUTHORIZED);
|
||||
}
|
||||
|
||||
if (deviceId == Device.MASTER_ID) {
|
||||
throw new ForbiddenException();
|
||||
}
|
||||
|
||||
final CompletableFuture<Void> deleteKeysFuture = keys.delete(account.getUuid(), deviceId);
|
||||
|
||||
messages.clear(account.getUuid(), deviceId).join();
|
||||
|
||||
Reference in New Issue
Block a user