Skip to content

Commit c0bb4d4

Browse files
Merge pull request #46 from Mastercard/fix/sonar-fix
Fix: sonar issue: csharpsquid:S6444. Denial of Service security hotspot
2 parents ff0a647 + 76f7639 commit c0bb4d4

File tree

1 file changed

+1
-1
lines changed
  • Mastercard.Developer.ClientEncryption.Core/Utils

1 file changed

+1
-1
lines changed

Mastercard.Developer.ClientEncryption.Core/Utils/JsonUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Mastercard.Developer.ClientEncryption.Core.Utils
77
{
88
internal static class JsonUtils
99
{
10-
private static readonly Regex LastElementInPathRegExp = new Regex(".*(\\['.*'\\])"); // Returns "['obj2']" for "$['obj1']['obj2']"
10+
private static readonly Regex LastElementInPathRegExp = new Regex(".*(\\['.*'\\])", RegexOptions.Compiled, TimeSpan.FromMilliseconds(100)); // Returns "['obj2']" for "$['obj1']['obj2']"
1111

1212
/// <summary>
1313
/// Get JSON path to the parent of the object at the given JSON path.

0 commit comments

Comments
 (0)