fix(security): Resolve SonarQube security hotspots
SonarQube Analysis / sonarqube (pull_request) Successful in 3m9s
SonarQube Analysis / sonarqube (pull_request) Successful in 3m9s
Introduce a default regex match timeout across the library to prevent potential ReDoS attacks (SonarQube rule S6444). Implement `[OnDeserialized]` methods to re-establish object invariants and validate state after deserialization, addressing SonarQube rule S5766.
This commit is contained in:
@@ -221,7 +221,7 @@ public class QueryComparator
|
||||
|
||||
// Normalize whitespace and case
|
||||
return System.Text.RegularExpressions.Regex
|
||||
.Replace(clause.Trim(), @"\s+", " ")
|
||||
.Replace(clause.Trim(), @"\s+", " ", System.Text.RegularExpressions.RegexOptions.None, Strata.SqlTools.SqlBreakdown.Utilities.RegexDefaults.MatchTimeout)
|
||||
.ToUpperInvariant();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user