mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 03:48:05 +01:00
Block downgrading sender key support
Disallow linking an additional device to an account that has already upgraded to having sender key support where the linked device does not have sender key support. This should prompt the person attempting to link the older application to upgrade in order to complete the linking process.
This commit is contained in:
@@ -234,6 +234,10 @@ public class DeviceController {
|
||||
private boolean isCapabilityDowngrade(Account account, DeviceCapabilities capabilities, String userAgent) {
|
||||
boolean isDowngrade = false;
|
||||
|
||||
if (account.isSenderKeySupported() && !capabilities.isSenderKey()) {
|
||||
isDowngrade = true;
|
||||
}
|
||||
|
||||
if (account.isGv1MigrationSupported() && !capabilities.isGv1Migration()) {
|
||||
isDowngrade = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user