| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
(Fixes https://github.com/faker-ruby/faker/security/code-scanning/14) Adds a possessive quantifier (an extra `+`) to the regex to prevent backtracking. This is to prevent the issue 'Polynomial regular expression used on uncontrolled data code'. It seems a bit overkill, given how these formatted strings are used, but I don't think it hurts either. See reference: https://ruby-doc.org/3.4.1/Regexp.html#class-Regexp-label-Greedy-2C+Lazy-2C+or+Possessive+Matching
(Fixes https://github.com/faker-ruby/faker/security/code-scanning/13) Similar to commit fa6d5df. Adds a possessive quantifier (an extra `+`) to the regex to prevent backtracking. See reference: https://ruby-doc.org/3.4.1/Regexp.html#class-Regexp-label-Greedy-2C+Lazy-2C+or+Possessive+Matching
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
* fix: add possessive quantifier to regex match for formatted strings (Fixes https://github.com/faker-ruby/faker/security/code-scanning/14) Adds a possessive quantifier (an extra `+`) to the regex to prevent backtracking. This is to prevent the issue 'Polynomial regular expression used on uncontrolled data code'. It seems a bit overkill, given how these formatted strings are used, but I don't think it hurts either. See reference: https://ruby-doc.org/3.4.1/Regexp.html#class-Regexp-label-Greedy-2C+Lazy-2C+or+Possessive+Matching * fix: add possessive quantifier to regex match for regexify (Fixes https://github.com/faker-ruby/faker/security/code-scanning/13) Similar to commit fa6d5df. Adds a possessive quantifier (an extra `+`) to the regex to prevent backtracking. See reference: https://ruby-doc.org/3.4.1/Regexp.html#class-Regexp-label-Greedy-2C+Lazy-2C+or+Possessive+Matching
| Back | FazBrowse Home | New Git URL |
(Fixes #3183)
Adds a possessive quantifier (an extra +) to some regexes to prevent backtracking.
This is to prevent the issue 'Polynomial regular expression used on
uncontrolled data code' issue.
It seems a bit overkill to me, given how these
formatted strings are used. But I don't think it hurts either.
See reference for regex possessive quantifiers:
https://ruby-doc.org/3.4.1/Regexp.html#class-Regexp-label-Greedy-2C+Lazy-2C+or+Possessive+Matching