mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 11:56:47 +00:00
Reject DeviceCheck assertions if they race with a counter update
This commit is contained in:
1 parent
75948dc617
commit
5bb7edcade
1 file changed
+3
-1
+3
-1
@@ -206,7 +206,9 @@ public class AppleDeviceCheckManager {
|
||||
}
|
||||
|
||||
// Store the updated sign count, so we can check the next assertion (step 6)
|
||||
appleDeviceChecks.updateCounter(account, keyId, appleDevice.getCounter());
|
||||
if (!appleDeviceChecks.updateCounter(account, keyId, appleDevice.getCounter())) {
|
||||
throw new RequestReuseException("Sign count from request less than stored sign count");
|
||||
}
|
||||
removeChallenge(redisChallengeKey);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user