Revert limits mistakenly added to EncryptionRequest
This commit is contained in:
parent
d1a1e87ab5
commit
1dda27e19b
@ -48,7 +48,7 @@ public abstract class DefinedPacket
|
|||||||
public static byte[] readArray(ByteBuf buf, int limit)
|
public static byte[] readArray(ByteBuf buf, int limit)
|
||||||
{
|
{
|
||||||
int len = readVarInt( buf );
|
int len = readVarInt( buf );
|
||||||
Preconditions.checkArgument( len <= limit, "Cannot receive byte array longer than %d (got %s bytes)", limit, len );
|
Preconditions.checkArgument( len <= limit, "Cannot receive byte array longer than %s (got %s bytes)", limit, len );
|
||||||
byte[] ret = new byte[ len ];
|
byte[] ret = new byte[ len ];
|
||||||
buf.readBytes( ret );
|
buf.readBytes( ret );
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -24,8 +24,8 @@ public class EncryptionRequest extends DefinedPacket
|
|||||||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||||
{
|
{
|
||||||
serverId = readString( buf );
|
serverId = readString( buf );
|
||||||
publicKey = readArray( buf, 128 );
|
publicKey = readArray( buf );
|
||||||
verifyToken = readArray( buf, 128 );
|
verifyToken = readArray( buf );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user