vyommani opened a new pull request, #1282:
URL: https://github.com/apache/ranger/pull/1282
## What changes were proposed in this pull request?
RecordFilterJavaScript now builds its engine through
NashornScriptEngineCreator, the same setup used for policy-condition scripts,
and runs SCRIPT_SAFE_PREEXEC before evaluating. If no engine is available, it
fails with MaskingException.
SCRIPT_SAFE_PREEXEC is moved into ScriptEngineUtil so both callers share it.
Note: row filters that use Nashorn-only syntax (for each, # comments) are
now rejected.
## Behaviour change
Row-filter expressions using Nashorn-only syntax (`for each`, expression
closures, `#` comments)
are now rejected with MaskingException. Standard JavaScript, and Java String
methods
such as `.equals()` / `.contains()` on JSON values, are unaffected.
## How was this patch tested?
all tests are green and added a new test as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]