Handle null early in Sanitizer.sanitize()
Closes gh-10806
This commit is contained in:
committed by
Stephane Nicoll
parent
4358638266
commit
c718880354
@@ -79,9 +79,12 @@ class Sanitizer {
|
||||
* @return the potentially sanitized value
|
||||
*/
|
||||
public Object sanitize(String key, Object value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
for (Pattern pattern : this.keysToSanitize) {
|
||||
if (pattern.matcher(key).matches()) {
|
||||
return (value == null ? null : "******");
|
||||
return "******";
|
||||
}
|
||||
}
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user