This is an automated email from the ASF dual-hosted git repository.

pradeep pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new d54eae3d5 RANGER-4963: Unescaped spaces with disjunctive matching in 
solr ranger_auth
d54eae3d5 is described below

commit d54eae3d5153bec1ecc91fc4e5414173a6312cf9
Author: Guru Thejus Arveti <[email protected]>
AuthorDate: Fri Oct 18 12:38:53 2024 +0530

    RANGER-4963: Unescaped spaces with disjunctive matching in solr ranger_auth
    
    Signed-off-by: Pradeep Agrawal <[email protected]>
    Change-Id: I4c3adc2cc940b96fb5a5ff01a8ea25bf493b26cb
---
 .../ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java
 
b/plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java
index 7d91ba4de..40bc453ff 100644
--- 
a/plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java
+++ 
b/plugin-solr/src/main/java/org/apache/ranger/authorization/solr/authorizer/RangerSolrAuthorizer.java
@@ -708,7 +708,7 @@ public class RangerSolrAuthorizer extends SearchComponent 
implements Authorizati
                if (roles != null && !roles.isEmpty()) {
                        StringBuilder builder = new StringBuilder();
                        for (String role : roles) {
-                               addDisjunctiveRawClause(builder, role);
+                               addDisjunctiveRawClause(builder, "\"" + role + 
"\"");
                        }
                        if (allRolesToken != null && !allRolesToken.isEmpty()) {
                                addDisjunctiveRawClause(builder, allRolesToken);

Reply via email to