Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Squidconf: Simplify IP regexes, fix catastrophic backtracking #2583

Merged
merged 3 commits into from Nov 17, 2023

Conversation

jeanas
Copy link
Contributor

@jeanas jeanas commented Nov 14, 2023

Fixes #2191

@birkenfeld
Copy link
Member

Yeah it's definitely not worth validating the 0-255 range of IP address octets here. What a monster!

@Anteru Anteru added the A-lexing area: changes to individual lexers label Nov 17, 2023
@Anteru
Copy link
Collaborator

Anteru commented Nov 17, 2023

What's your take on having a common.py or similar which extracts common Regex pattern for reuse, for example, IP addresses, float numbers, that kind of stuff?

@Anteru Anteru added this to the 2.17 milestone Nov 17, 2023
@Anteru Anteru merged commit f083450 into pygments:master Nov 17, 2023
15 checks passed
@jeanas jeanas deleted the squidconf branch November 17, 2023 13:35
@jeanas
Copy link
Contributor Author

jeanas commented Nov 17, 2023

Why not, though I'd have to check how many patterns can actually be folded like that. One issue is that this is a bit fraught if done in lexers with different regex flags...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lexing area: changes to individual lexers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Catastrophic backtracking in SquidConfLexer
3 participants