RED-9760: Do not check blacklisted keywords in Strings
This commit is contained in:
parent
b4ecbde89e
commit
305cd8f5ac
@ -283,7 +283,9 @@ public class DroolsValidationService {
|
||||
|
||||
private DroolsBlacklistErrorMessage checkAndGetBlackListedMessages(SearchImplementation blacklistedKeywordSearchImplementation, String stringToCheck, int lineIndexStart) {
|
||||
|
||||
String sanitizedRuleText = StringUtils.deleteWhitespace(stringToCheck);
|
||||
String nonWhitespaceRuleText = StringUtils.deleteWhitespace(stringToCheck);
|
||||
String sanitizedRuleText= nonWhitespaceRuleText.replaceAll("\"(\\\\.|[^\"\\\\])*\"|'(\\\\.|[^'\\\\])*'" ,"");
|
||||
|
||||
List<SearchImplementation.MatchPosition> matches = blacklistedKeywordSearchImplementation.getMatches(sanitizedRuleText);
|
||||
|
||||
if (!matches.isEmpty()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user