Skip to content

fix: add Windows specific characters to config value syntax #3430

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

Merged
merged 5 commits into from
Aug 3, 2025

Conversation

airween
Copy link
Member

@airween airween commented Jul 30, 2025

what

This PR fixes a bug: if the host is a Windows based server, and admin wants to set any path where the directory name contains space (and the separator is the blackslash), then parser throws an error.

These characters have been added:

  • space
  • \ (backslash) (it's escaped, so this is it: \\
  • ( and ) (parenthesis) (these are also escaped)

why

The problem is described in #3429.

references

#3429

@airween
Copy link
Member Author

airween commented Jul 31, 2025

See #3429 - @skvoboo-gh tested this on Windows.

theseion
theseion previously approved these changes Aug 1, 2025
Copy link

sonarqubecloud bot commented Aug 1, 2025

@airween
Copy link
Member Author

airween commented Aug 1, 2025

Okay, I found the problem and fixed it. Recent changes:

  • d8574c8: I fixed the regex in the failed regression test; see previous issue
  • 013c8c2: I put back @theseion's suggestion
    • it seems like the syntax produced the same tokenizer, because I re-generated the file seclang-scanner.cc, and it's the same, no diff

@airween airween merged commit 0ac551b into owasp-modsecurity:v3/master Aug 3, 2025
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants