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:
parent
224f6ade1e
commit
fd55c6fe26
3
authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasSimpleAuthorizer.java
Normal file → Executable file
3
authorization/src/main/java/org/apache/atlas/authorize/simple/AtlasSimpleAuthorizer.java
Normal file → Executable 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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue