ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhay Kulkarni (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (RANGER-2247) Ranger Plugin for HDFS throws StringIndexOutOfBounds exception when policy resource is "\"
Date Wed, 17 Oct 2018 22:13:00 GMT

    [ 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)

Mime
View raw message