On Sat, 22 May 2021 20:16:37 GMT, Roger Riggs <rri...@openjdk.org> wrote:

>> JEP 415: Context-specific Deserialization Filters extends the 
>> deserialization filtering mechanisms with more flexible and customizable 
>> protections against malicious deserialization.  See JEP 415: 
>> https://openjdk.java.net/jeps/415.
>> The `java.io.ObjectInputFilter` and `java.io.ObjectInputStream` classes are 
>> extended with additional
>> configuration mechanisms and filter utilities.
>> 
>> javadoc for `ObjectInputFilter`, `ObjectInputFilter.Config`, and 
>> `ObjectInputStream`:
>>     
>> http://cr.openjdk.java.net/~rriggs/filter-factory/java.base/java/io/ObjectInputFilter.html
>
> Roger Riggs has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Editorial javadoc updated based on review comments.
>   Clarified behavior of rejectUndecidedClass method.
>   Example test added to check status returned from file.

src/java.base/share/classes/java/io/ObjectInputFilter.java line 770:

> 768:         /**
> 769:          * Returns a filter that returns {@code Status.ALLOWED} if the 
> predicate on the class is {@code true},
> 770:          * otherwise the {@code otherStatus}.

I originally overlooked the fact that UNDECIDED can be returned by these 
filters. Would it be clearer to drop "otherwise the otherStatus" ?? I also 
wonder if otherStatus carries its own weight? How useful is it to return an 
otherStatus that is not UNDECIDED?

-------------

PR: https://git.openjdk.java.net/jdk/pull/3996

Reply via email to