ATLAS-4536: The newline character in attribues will fail simple auth check

Signed-off-by: Sarath Subramanian <sarath@apache.org>
This commit is contained in:
Garry Easop 2022-01-20 11:50:57 -08:00 committed by Sarath Subramanian
parent 224f6ade1e
commit fd55c6fe26
1 changed files with 2 additions and 1 deletions

View File

@ -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;