openequella / openEQUELLA

Core openEQUELLA sources
https://openequella.github.io/
Apache License 2.0
42 stars 44 forks source link

Move to using the JRE embedded Rhino Javascript engine #1716

Open edalex-ian opened 4 years ago

edalex-ian commented 4 years ago

Is your feature request related to a problem? Please describe.

Currently oEQ embeds it's own version of Rhino, and until recently (#1714) was using a very outdated version.

This is used to provide server side scripting, and as a result we want to ensure it's up to date to ensure maximum performance and that any security issues are addressed.

Describe the solution you'd like

The JRE has included Rhino as of version 6 - which happened around midway in oEQ's life. So instead of manually embedding, it would be interesting to look at utilising the one provided by the JRE and then it can be kept up to date independently.

Describe alternatives you've considered

None. Not really interested in embedding a completely different javascript engine implementation, just be good to not have to maintain it at all.

Additional context

Supporting quote from https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino

[Rhino] is embedded in J2SE 6 as the default Java scripting engine.

ChristianMurphy commented 4 years ago

Moving to embedded Rhino over packaged rhino could be good. :+1: In terms of speed an security, newer versions of Rhino are better, but still lag behind SpiderMonkey or V8. Another option available is https://github.com/eclipsesource/j2v8