mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 13:58:07 +01:00
Validate registration IDs
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright 2023 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.util;
|
||||
|
||||
import org.whispersystems.textsecuregcm.storage.Device;
|
||||
|
||||
public class RegistrationIdValidator {
|
||||
public static boolean validRegistrationId(int registrationId) {
|
||||
return registrationId > 0 && registrationId <= Device.MAX_REGISTRATION_ID;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user