This is an automated email from the ASF dual-hosted git repository. sarath pushed a commit to branch branch-2.0 in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/branch-2.0 by this push: new 3a2378f ATLAS-4536: The newline character in attribues will fail simple auth check 3a2378f is described below commit 3a2378f2adc6b796a838cde411f2f3edd77311ea Author: Garry Easop <gea...@cloudera.com> AuthorDate: Thu Jan 20 11:50:57 2022 -0800 ATLAS-4536: The newline character in attribues will fail simple auth check Signed-off-by: Sarath Subramanian <sar...@apache.org> (cherry picked from commit fd55c6fe2695c62338c0cfa751d1e019a523e81f) --- .../java/org/apache/atlas/authorize/simple/AtlasSimpleAuthorizer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasSimpleAuthorizer.java b/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasSimpleAuthorizer.java old mode 100644 new mode 100755 index 7b99e97..d80cab4 --- a/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasSimpleAuthorizer.java +++ b/authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasSimpleAuthorizer.java @@ -64,6 +64,7 @@ public final class AtlasSimpleAuthorizer implements AtlasAuthorizer { private AtlasSimpleAuthzPolicy authzPolicy; + private final static String REGEX_MATCHALL = ".*"; public AtlasSimpleAuthorizer() { } @@ -466,7 +467,7 @@ public final class AtlasSimpleAuthorizer implements AtlasAuthorizer { if (value == null) { ret = true; } else { - ret = StringUtils.equalsIgnoreCase(value, pattern) || value.matches(pattern); + ret = pattern.equals(REGEX_MATCHALL) || StringUtils.equalsIgnoreCase(value, pattern) || value.matches(pattern); } return ret;