-
-
Notifications
You must be signed in to change notification settings - Fork 393
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
fix: collections not being initialized without User-Agent header #3645
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we write tests for this change?
I mean, for both cases. With and without user-agent.
@fzipi Sure but is there a way how can i know if collections were or were not initialized? How to write a test for it? |
Don't know what to say here. @dune73 do you have a clue on how to test this? |
Testing this with ftw is complicated. If you want to test it, you would need an additional rule that checks for a variable in the collection. If you do not want to do that, then you add a plugin with an effect based on the collection. Like the anti-dos plugin and then you run enough requests to trigger (and kill all subsequent testing). Honestly, I think we can add a remark here and forget about the testing for the time being, it's not worth the hassle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can add a comment to the rule then better. If not, I'll just approve.
Sure but what comment? |
Proposal:
|
Done! |
ip
andglobal
collections are not initialized for requests without aUser-Agent
header. This may allow malicious users to bypass rules using these collections.Fixes #3642.