IcedTea-Web icon indicating copy to clipboard operation
IcedTea-Web copied to clipboard

add nashorn based pac evaluator

Open dimitryc opened this issue 3 years ago • 0 comments

Please review the patch that introduces an alternative Nashorn-based implementation for PAC (proxy-auto-config) functionality.

Switching to Nashorn will help to fix various compatibilities issues (that worked fine with Oracle JRE). E.g. an application may bundle Rhino itself and different versions of Rhino may conflict with each other.

The proposed patch doesn't change the behaviour if --with-rhino option is explicitly passed to configure script. It should be enough not to pass --with-rhino option to activate Nashorn-based implementation.

As per [1], the implementation doesn't use "eval(String)" method as the PAC scripts will treated as untrusted. Instead, the needed set of permissions is granted to the PAC scripts via Policy.getPermissions().

[1] https://wiki.openjdk.java.net/display/Nashorn/Nashorn+script+security+permissions

dimitryc avatar May 31 '22 09:05 dimitryc