mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-30 08:56:52 +00:00
Ensure GV1 length is exactly the length expected.
This commit is contained in:
committed by
Greyson Parrelli
parent
0815715f7b
commit
8e962bf992
@@ -40,7 +40,7 @@ public abstract class GroupId {
|
||||
}
|
||||
|
||||
public static @NonNull GroupId.V1 v1(byte[] gv1GroupIdBytes) throws BadGroupIdException {
|
||||
if (gv1GroupIdBytes.length == V2_BYTE_LENGTH) {
|
||||
if (gv1GroupIdBytes.length != MMS_BYTE_LENGTH) {
|
||||
throw new BadGroupIdException();
|
||||
}
|
||||
return new GroupId.V1(gv1GroupIdBytes);
|
||||
|
||||
Reference in New Issue
Block a user