ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Madhan Neethiraj <mad...@apache.org>
Subject Re: Review Request 68983: RANGER-2247: Ranger Plugin for HDFS throws StringIndexOutOfBounds exception when policy resource is "\"
Date Wed, 17 Oct 2018 21:09:35 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68983/#review209717
-----------------------------------------------------------


Ship it!




Ship It!

- Madhan Neethiraj


On Oct. 17, 2018, 9:05 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68983/
> -----------------------------------------------------------
> 
> (Updated Oct. 17, 2018, 9:05 p.m.)
> 
> 
> 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

>   agents-common/src/test/resources/resourcematcher/test_resourcematcher_dynamic.json
db19f762d 
>   agents-common/src/test/resources/resourcematcher/test_resourcematcher_wildcards_as_delimiters.json
8e791d62c 
> 
> 
> Diff: https://reviews.apache.org/r/68983/diff/3/
> 
> 
> Testing
> -------
> 
> Ran all unit tests successfully
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message