8000 fix: rule 930110 is not supposed to match bare '..' without (back)slashes by azurit · Pull Request #4050 · coreruleset/coreruleset · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: rule 930110 is not supposed to match bare '..' without (back)slashes #4050

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 6 commits into from
Mar 25, 2025

Conversation

azurit
Copy link
Member
@azurit azurit commented Mar 24, 2025

Feature was originally added in #2016 but was incorrectly implemented. Test, which was supposed to check for this, was not working because rule is targeting REQUEST_URI from which is engine removing . and .. in the path part of the URI (path is normalized).

Copy link
Contributor
github-actions bot commented Mar 24, 2025

📊 Quantitative test results for language: eng, year: 2023, size: 10K, paranoia level: 1:
🚀 Quantitative testing did not detect new false positives

@azurit
Copy link
Member Author
azurit commented Mar 24, 2025

@theseion Can you please check what is going on? It should work, see (test 7 is on the last line):
https://regex101.com/r/ZQBjt6/1

Maybe the backend is returning 400 Bad Request?

@theseion
Copy link
Contributor

I think you need to change the test to expect_ids:.... As the comment says, it appears to have been "disabled" due to the behaviour of REQUEST_URI. The comment should probably also be updated.

@azurit
Copy link
Member Author
azurit commented Mar 24, 2025

No, it is a negative test...

@theseion
Copy link
Contributor

There's an override for nginx in nginx-overrides.yaml. You need to remove that since your change makes the test work as expected in nginx.

@theseion theseion force-pushed the Fix930110 branch 2 times, most recently from 16f8b10 to 7e33353 Compare March 25, 2025 06:18
@theseion
Copy link
Contributor

I've added a change to your PR that fixes a race condition when waiting for the server to start.

@azurit
Copy link
Member Author
azurit commented Mar 25, 2025

@theseion The main problem is with test 930110-7 which should pass. Here you can see that a regex from this PR does not match a value from test 7 (at the last line).

@azurit
Copy link
Member Author
azurit commented Mar 25, 2025

That is why i'm asking why exactly is it not passing as i cannot get this information by myself (i assume - i don't think i have access to it, correct me if i'm wrong). And that is why i was suggesting that backend (apache/nginx) is, maybe, returning code 400 (Bad Request) because this is what Apache and also nginx is returning when .. is in path part of the request URI - so, maybe, that code 400 is a reson why is this test not passing. Because it should pass.

@theseion
Copy link
Contributor

As I wrote, just update nginx-overrides.yaml and add that change to your PR.

@azurit
Copy link
Member Author
azurit commented Mar 25, 2025

As I wrote, just update nginx-overrides.yaml and add that change to your PR.

Cool, thanks, misunderstood you the first time.

@azurit azurit added this pull request to the merge queue Mar 25, 2025
Merged via the queue into coreruleset:main with commit 81cf60c Mar 25, 2025
6 checks passed
@azurit azurit deleted the Fix930110 branch March 25, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0