Fix polynomial regular expression vulnerability in XML encoding detection by Copilot · Pull Request #68 · codehaus-plexus/plexus-xml
Changed the regex pattern from .* to .*? to use non-greedy matching, preventing catastrophic backtracking on malicious input. Added test case to validate the fix with various edge cases. Co-authored-by: slachiewicz <6705942+slachiewicz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix code scanning alert for polynomial regex on uncontrolled data
Fix polynomial regular expression vulnerability in XML encoding detection
slachiewicz
deleted the
copilot/fix-polynomial-regex-issue
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters