Reference lookups.
There is one system-wide filter instance per VM that can be set via
the "jdk.jndi.object.factoriesFilter" system property value, or via
setting the property in the security properties file. The system property value supersedes
the security property value. If none of the properties are specified the default
"*" value is used.
The filter is implemented as ObjectInputFilter with capabilities limited to the
validation of a factory's class types only (FilterInfo#serialClass()).
Array length, number of object references, depth, and stream size filtering capabilities are
not supported by the filter.
| Modifier and Type | Class and Description |
|---|---|
| private static interface | |
| private static interface | |
| private static record | |
| private static record |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| private static final String | |
| private static final String | |
| private static final ObjectFactoriesFilter. | |
| private static final String | |
| private static final ObjectFactoriesFilter. | |
| private static final String | |
| private static final ObjectFactoriesFilter. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | Returns: true - if the factory is allowed to be instantiated; false - otherwiseobjects factory class serialClass)Checks if serial filter configured with |
| private static boolean | checkInput(ObjectFactoriesFilter.
|
| public static boolean | Returns: true - if the factory is allowed to be instantiated; false - otherwiseobjects factory class serialClass)Checks if the factory filters allow the given factory class for LDAP. |
| public static boolean | Returns: true - if the factory is allowed to be instantiated; false - otherwiseobjects factory class serialClass)Checks if the factory filters allow the given factory class for RMI. |
| private static String | |
| private static ObjectFactoriesFilter. |
| DEFAULT_GLOBAL_SP_VALUE | back to summary |
|---|---|
| private static final String DEFAULT_GLOBAL_SP_VALUE | |
| DEFAULT_LDAP_SP_VALUE | back to summary |
|---|---|
| private static final String DEFAULT_LDAP_SP_VALUE | |
| DEFAULT_RMI_SP_VALUE | back to summary |
|---|---|
| private static final String DEFAULT_RMI_SP_VALUE | |
| GLOBAL_FACTORIES_FILTER_PROPNAME | back to summary |
|---|---|
| private static final String GLOBAL_FACTORIES_FILTER_PROPNAME | |
| GLOBAL_FILTER | back to summary |
|---|---|
| private static final ObjectFactoriesFilter. | |
| LDAP_FACTORIES_FILTER_PROPNAME | back to summary |
|---|---|
| private static final String LDAP_FACTORIES_FILTER_PROPNAME | |
| LDAP_FILTER | back to summary |
|---|---|
| private static final ObjectFactoriesFilter. | |
| RMI_FACTORIES_FILTER_PROPNAME | back to summary |
|---|---|
| private static final String RMI_FACTORIES_FILTER_PROPNAME | |
| RMI_FILTER | back to summary |
|---|---|
| private static final ObjectFactoriesFilter. | |
| ObjectFactoriesFilter | back to summary |
|---|---|
| private ObjectFactoriesFilter() | |
| checkGlobalFilter | back to summary |
|---|---|
| public static boolean checkGlobalFilter(Class<?> serialClass) Checks if serial filter configured with
| |
| checkInput | back to summary |
|---|---|
| private static boolean checkInput(ObjectFactoriesFilter. | |
| checkLdapFilter | back to summary |
|---|---|
| public static boolean checkLdapFilter(Class<?> serialClass) Checks if the factory filters allow the given factory class for LDAP. This method combines the global and LDAP specific filter results to determine if the given factory class is allowed. The given factory class is rejected if any of these two filters reject it, or if none of them allow it.
| |
| checkRmiFilter | back to summary |
|---|---|
| public static boolean checkRmiFilter(Class<?> serialClass) Checks if the factory filters allow the given factory class for RMI. This method combines the global and RMI specific filter results to determine if the given factory class is allowed. The given factory class is rejected if any of these two filters reject it, or if none of them allow it.
| |
| getFilterPropertyValue | back to summary |
|---|---|
| private static String getFilterPropertyValue(String propertyName, String defaultValue) | |
| initializeFilter | back to summary |
|---|---|
| private static ObjectFactoriesFilter. | |
| Modifier and Type | Method and Description |
|---|---|
| public ObjectInputFilter |
| filter | back to summary |
|---|---|
| public ObjectInputFilter filter() | |
| Modifier and Type | Method and Description |
|---|---|
| public default long | arrayLength()
Implements java. The number of array elements when deserializing an array of the class. |
| public default long | |
| public default long | references()
Implements java. The current number of object references. |
| public default long | streamBytes()
Implements java. The current number of bytes consumed. |
| arrayLength | back to summary |
|---|---|
| public default long arrayLength() Implements java. Doc from java. The number of array elements when deserializing an array of the class.
| |
| depth | back to summary |
|---|---|
| public default long depth() Implements java. Doc from java. The current depth.
The depth starts at
| |
| references | back to summary |
|---|---|
| public default long references() Implements java. Doc from java. The current number of object references.
| |
| streamBytes | back to summary |
|---|---|
| public default long streamBytes() Implements java. Doc from java. The current number of bytes consumed.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final IllegalArgumentException | |
| private final String | filterPropertyName
Record Component accessed by filterPropertyName(). |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public IllegalArgumentException | |
| public ObjectInputFilter | |
| public String | |
| public final int | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| error | back to summary |
|---|---|
| private final IllegalArgumentException error Record Component accessed by error(). | |
| filterPropertyName | back to summary |
|---|---|
| private final String filterPropertyName Record Component accessed by filterPropertyName(). | |
| InvalidFilter | back to summary |
|---|---|
| private InvalidFilter(String filterPropertyName, IllegalArgumentException error) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| error | back to summary |
|---|---|
| public IllegalArgumentException error() Record Component getter of error. | |
| filter | back to summary |
|---|---|
| public ObjectInputFilter filter() Implements com.
| |
| filterPropertyName | back to summary |
|---|---|
| public String filterPropertyName() Record Component getter of filterPropertyName. | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |
| Modifier and Type | Field and Description |
|---|---|
| private final ObjectInputFilter |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public final boolean | equals(Object o)
Implements abstract java. Indicates whether some other object is "equal to" this one. |
| public ObjectInputFilter | filter()
Record Component getter of filter. Implements com.
|
| public final int | |
| public final String | toString()
Implements abstract java. Returns a string representation of the record. |
| filter | back to summary |
|---|---|
| private final ObjectInputFilter filter Record Component accessed by filter(). | |
| ValidFilter | back to summary |
|---|---|
| private ValidFilter(ObjectInputFilter filter) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object o) Implements abstract java. Doc from java. Indicates whether some other object is "equal to" this one. In addition
to the general contract of
R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
| |
| filter | back to summary |
|---|---|
| public ObjectInputFilter filter() Record Component getter of filter. Implements com. | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Implements abstract java. Doc from java. Returns a hash code value for the record.
Obeys the general contract of | |
| toString | back to summary |
|---|---|
| public final String toString() Implements abstract java. Doc from java. Returns a string representation of the record.
In accordance with the general contract of In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves. | |