Skip to content

Conversation

@jtduffy
Copy link
Contributor

@jtduffy jtduffy commented Dec 30, 2024

Resolves #2184

  • Use compiled regex pattern to detect un-escaped ", sequences
  • New unit tests

Regarding the use of regex, I ran several tests iterating over the getIndexToModifyJson method 1 million times, and the total time was around 450ms for each test.

meiao
meiao previously approved these changes Dec 30, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.67%. Comparing base (9124406) to head (51a81f1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2187   +/-   ##
=========================================
  Coverage     70.67%   70.67%           
+ Complexity     9996     9995    -1     
=========================================
  Files           842      842           
  Lines         40363    40363           
  Branches       6116     6116           
=========================================
+ Hits          28525    28527    +2     
+ Misses         9084     9081    -3     
- Partials       2754     2755    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jtduffy jtduffy merged commit fafe3de into main Jan 2, 2025
114 checks passed
@jtduffy jtduffy deleted the log4j-json-escape-string branch January 2, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Log4j JsonTemplateLayout w/ local decorating - Properly support escaped double quotes followed by a comma

4 participants