[ 
https://issues.apache.org/jira/browse/RANGER-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16654287#comment-16654287
 ] 

Abhay Kulkarni commented on RANGER-2247:
----------------------------------------

Commit details:
master:
https://git-wip-us.apache.org/repos/asf?p=ranger.git;a=commit;h=70efa6810d5880184578b54a205b62a1349f426b

> Ranger Plugin for HDFS throws StringIndexOutOfBounds exception when policy 
> resource is "\"
> ------------------------------------------------------------------------------------------
>
>                 Key: RANGER-2247
>                 URL: https://issues.apache.org/jira/browse/RANGER-2247
>             Project: Ranger
>          Issue Type: Bug
>          Components: Ranger
>    Affects Versions: master
>            Reporter: Abhay Kulkarni
>            Assignee: Abhay Kulkarni
>            Priority: Major
>             Fix For: 2.0.0, 1.1.1, 1.2.1
>
>
> 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
> org.apache.hadoop.ipc.RemoteException(java.lang.StringIndexOutOfBoundsException):
>  String index out of range: -1
>       at java.lang.String.substring(String.java:1967)
>       at 
> org.apache.ranger.plugin.resourcematcher.RecursiveMatcher.getStringToCompare(RangerPathResourceMatcher.java:234)
>       at 
> org.apache.ranger.plugin.resourcematcher.CaseSensitiveRecursiveMatcher.isMatch(RangerPathResourceMatcher.java:249)
>       at 
> org.apache.ranger.plugin.resourcematcher.RangerDefaultResourceMatcher.isMatch(RangerDefaultResourceMatcher.java:45)
>       at 
> org.apache.ranger.plugin.policyresourcematcher.RangerDefaultPolicyResourceMatcher.getMatchType(RangerDefaultPolicyResourceMatcher.java:478)
>       at 
> org.apache.ranger.plugin.policyevaluator.RangerDefaultPolicyEvaluator.evaluate(RangerDefaultPolicyEvaluator.java:177)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to