Revert limits mistakenly added to EncryptionRequest

This commit is contained in:
Thinkofname 2016-03-30 23:30:26 +01:00
parent d1a1e87ab5
commit 1dda27e19b
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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