Class ParanoidObjectDataInputStream
- java.lang.Object
- 
- java.io.InputStream
- 
- com.hazelcast.internal.serialization.impl.ObjectDataInputStream
- 
- com.atlassian.confluence.impl.cluster.hazelcast.interceptor.authenticator.ParanoidObjectDataInputStream
 
 
 
- 
- All Implemented Interfaces:
- com.hazelcast.nio.ObjectDataInput,- com.hazelcast.nio.VersionAware,- Closeable,- DataInput,- AutoCloseable
 
 public class ParanoidObjectDataInputStream extends com.hazelcast.internal.serialization.impl.ObjectDataInputStreamA subclass of Hazelcast'sObjectDataInputStreamspecifically for use during join checks which applies bounds to certain operations.What this class overrides and what it doesn't is strongly influenced by what methods the join check implementations actually call. For example, any of the read*Arraymethods could also be used to try and instantiate arrays of unrealistic size and triggerOutOfMemoryErrors. However, the join checks never call those methods, so in practice there's no vulnerability there.- Since:
- 7.17.3
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected com.hazelcast.version.Versionversion
 - 
Constructor SummaryConstructors Constructor Description ParanoidObjectDataInputStream(InputStream in, com.hazelcast.internal.serialization.InternalSerializationService serializationService)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description com.hazelcast.version.VersiongetVersion()StringreadUTF()OverridesObjectDataInputStream.readUTF()and applies a hard upper limit to the number of chars that can be read, to prevent malicious clients from triggeringOutOfMemoryErrorsvoidsetVersion(com.hazelcast.version.Version arg0)- 
Methods inherited from class com.hazelcast.internal.serialization.impl.ObjectDataInputStreamavailable, close, getByteOrder, getClassLoader, getSerializationService, mark, markSupported, read, read, read, readBoolean, readBooleanArray, readByte, readByteArray, readChar, readCharArray, readData, readDataAsObject, readDouble, readDoubleArray, readFloat, readFloatArray, readFully, readFully, readInt, readIntArray, readLine, readLong, readLongArray, readObject, readObject, readShort, readShortArray, readUnsignedByte, readUnsignedShort, readUTFArray, reset, skip, skipBytes
 - 
Methods inherited from class java.io.InputStreamnullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
 
- 
 
- 
- 
- 
Constructor Detail- 
ParanoidObjectDataInputStreampublic ParanoidObjectDataInputStream(InputStream in, com.hazelcast.internal.serialization.InternalSerializationService serializationService) 
 
- 
 - 
Method Detail- 
readUTFpublic String readUTF() throws IOException OverridesObjectDataInputStream.readUTF()and applies a hard upper limit to the number of chars that can be read, to prevent malicious clients from triggeringOutOfMemoryErrors- Specified by:
- readUTFin interface- DataInput
- Overrides:
- readUTFin class- com.hazelcast.internal.serialization.impl.ObjectDataInputStream
- Returns:
- the UTF string, or nullif the requested length is -1
- Throws:
- IOException- if data cannot be read from the stream
- UTFDataFormatException- if the string length to read is excessively long
 
 - 
setVersionpublic void setVersion(com.hazelcast.version.Version arg0) 
 - 
getVersionpublic com.hazelcast.version.Version getVersion() - Specified by:
- getVersionin interface- com.hazelcast.nio.VersionAware
 
 
- 
 
-