[
https://issues.apache.org/jira/browse/RANGER-2708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17021973#comment-17021973
]
Pradeep Agrawal commented on RANGER-2708:
-----------------------------------------
[~larsfrancke] Patch has PMD issue so I have fixed that and committed in the
master branch. Please close the RR.
[https://github.com/apache/ranger/commit/3a4bb32abe0a24628f1c16f1eedf792b37906372]
> Ranger public group check uses wrong comparison for equality
> ------------------------------------------------------------
>
> Key: RANGER-2708
> URL: https://issues.apache.org/jira/browse/RANGER-2708
> Project: Ranger
> Issue Type: Bug
> Components: Ranger
> Reporter: Lars Francke
> Assignee: Lars Francke
> Priority: Major
> Attachments: RANGER-2708.1.patch
>
>
> In {{RangerBizUtil#checkUsrPermForPolicy}} we can find this piece of code:
> {code:java}
> matchFound = (publicGroupId != null && publicGroupId == permMap.getGroupId())
> || isGroupInList(permMap.getGroupId(), userGroups);
> {code}
> {{publicGroupId}} and {{permMap.getGroupId()}} are both Long so testing
> equality using "{{==}}" is wrong and only works "by accident" or not at all
> depending on the JVM.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)