-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68983/
-----------------------------------------------------------
Review request for ranger, Madhan Neethiraj and Velmurugan Periasamy.
Bugs: RANGER-2247
https://issues.apache.org/jira/browse/RANGER-2247
Repository: ranger
Description
-------
With a hdfs policy with a single \ as a resource, Ranger plugin throws
exception.
% hdfs dfs -ls /user/
ls: String index out of range: -1
The root cause is token-replacer code returns empty string, as \ is default
escape character for tokens. Fix is to return \ in such cases.
Diffs
-----
agents-common/src/main/java/org/apache/ranger/plugin/resourcematcher/RangerPathResourceMatcher.java
78a3b8a8e
agents-common/src/main/java/org/apache/ranger/plugin/util/StringTokenReplacer.java
ace04d65c
agents-common/src/test/resources/policyengine/test_policyengine_hdfs.json
ea167f49c
Diff: https://reviews.apache.org/r/68983/diff/1/
Testing
-------
Ran all unit tests successfully
Thanks,
Abhay Kulkarni