mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 05:56:47 +00:00
Don't allow callers to unlink their primary device
This commit is contained in:
1 parent
845fc338d7
commit
2b764c2abd
1 file changed
+4
+4
@@ -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