Merge branch 'RED-9760-4.1-rules' into 'release/4.348.x'
RED-9760: Do not check blacklisted keywords in Strings See merge request redactmanager/redaction-service!488
This commit is contained in:
commit
7396c04314
@ -283,7 +283,9 @@ public class DroolsValidationService {
|
|||||||
|
|
||||||
private DroolsBlacklistErrorMessage checkAndGetBlackListedMessages(SearchImplementation blacklistedKeywordSearchImplementation, String stringToCheck, int lineIndexStart) {
|
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);
|
List<SearchImplementation.MatchPosition> matches = blacklistedKeywordSearchImplementation.getMatches(sanitizedRuleText);
|
||||||
|
|
||||||
if (!matches.isEmpty()) {
|
if (!matches.isEmpty()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user