mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3274: guard a null string case in case of string match.
This commit is contained in:
parent
97ff4981c5
commit
8202acdbc1
|
|
@ -153,8 +153,10 @@ public class StringUtils {
|
|||
// Responsible for stripping sensitive content from request and response strings
|
||||
public static String cleanString(String stringToClean){
|
||||
String cleanResult = "";
|
||||
cleanResult = REGEX_PASSWORD_QUERYSTRING.matcher(stringToClean).replaceAll("");
|
||||
cleanResult = REGEX_PASSWORD_JSON.matcher(cleanResult).replaceAll("");
|
||||
if (stringToClean != null) {
|
||||
cleanResult = REGEX_PASSWORD_QUERYSTRING.matcher(stringToClean).replaceAll("");
|
||||
cleanResult = REGEX_PASSWORD_JSON.matcher(cleanResult).replaceAll("");
|
||||
}
|
||||
return cleanResult;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue