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
VIP Request Block: Add function to allow for blocking by partial User Agent string. #4001
VIP Request Block: Add function to allow for blocking by partial User Agent string. #4001
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #4001 +/- ##
=============================================
+ Coverage 32.27% 32.29% +0.01%
- Complexity 3768 3771 +3
=============================================
Files 226 226
Lines 16803 16807 +4
=============================================
+ Hits 5424 5428 +4
Misses 11379 11379
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
8bdcce0
to
a33ee69
Compare
@sjinks I committed the changes on behalf. |
177a1d9
to
5dbc3ff
Compare
@rebeccahum thank you, I will take a closer look tomorrow - I see SonarCloud complains etc. |
5dbc3ff
to
4efcce1
Compare
It's suggesting that this line should be Same fix will be needed in at least one other method too. |
4efcce1
to
cc4e537
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
I would like to block requests by a partial match on the user agent string. The use case is a User Agent header like 'WordPress/6.1.1; https://www.example.com' which is the default format of a User Agent string to WordPress. If I block by exact match, as soon as WordPress is upgraded, this exact match will no longer work.
Changelog Description
Adds VIP_Request_Block::ua_partial_match
Checklist
Please make sure the items below have been covered before requesting a review:
Steps to Test
Outline the steps to test and verify the PR here.
Example:
VIP_Request_Block::ua_partial_match
with a substring instead ofVIP_Request_Block::ua