This is an automated email from the ASF dual-hosted git repository.
pradeep pushed a commit to branch ranger-2.6
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/ranger-2.6 by this push:
new 672ee1125 RANGER-4963: Unescaped spaces with disjunctive matching in
solr ranger_auth
672ee1125 is described below
commit 672ee11254335b1482a472be3be892fbfac16935
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);