-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Use SCRIPT_NAME
instead of REQUEST_URI
to check path
#589
Conversation
The script is currently checking if the `REQUEST_URI` is containing `wp-comments-post.php`, the default script to handle the submission of a comment. Some security plugins have options to rename this file to disguise that WordPress is used. With this fix, the `SCRIPT_NAME` is used instead. Since many security plugins do use rewrite rules, while the `REQUEST_URI` value is changed, the `SCRIPT_NAME` value stays the same. Therefore the condition would still recognize if a comment was submitted. Fixes #585
230bbcd
to
e861fcd
Compare
e861fcd
to
cb75530
Compare
Somehow, I accidentally closed the PR 🤔 |
f68532c
to
899df20
Compare
b4ed229
to
899df20
Compare
Quality Gate passedIssues Measures |
Possible alternative approach: |
@Zodiac1978 I don't think it's an alternative approach, it's just another step. Currently, the condition is the following:
The This is only affecting the left side of the condition and the first parameter Since this PR resolves the issue, I would not introduce a new function call (twice), we probably don't need. |
|
The @Zodiac1978 are you also OK to merge this then? |
I just asked the author and if his approach is not smart, let's do it better. From my understanding, it would still solve the issue with his plugin, so yes, I'm fine with PR! |
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.
LGTM!
The script is currently checking if the `REQUEST_URI` is containing `wp-comments-post.php`, the default script to handle the submission of a comment. Some security plugins have options to rename this file to disguise that WordPress is used. With this fix, the `SCRIPT_NAME` is used instead. Since many security plugins do use rewrite rules, while the `REQUEST_URI` value is changed, the `SCRIPT_NAME` value stays the same. Therefor the condition would still recognize if a comment was submitted. Original fix by @2ndkauboy in #589, adapted to v3.
The script is currently checking if the `REQUEST_URI` is containing `wp-comments-post.php`, the default script to handle the submission of a comment. Some security plugins have options to rename this file to disguise that WordPress is used. With this fix, the `SCRIPT_NAME` is used instead. Since many security plugins do use rewrite rules, while the `REQUEST_URI` value is changed, the `SCRIPT_NAME` value stays the same. Therefor the condition would still recognize if a comment was submitted. Original fix by @2ndkauboy in #589, adapted to v3.
The script is currently checking if the `REQUEST_URI` is containing `wp-comments-post.php`, the default script to handle the submission of a comment. Some security plugins have options to rename this file to disguise that WordPress is used. With this fix, the `SCRIPT_NAME` is used instead. Since many security plugins do use rewrite rules, while the `REQUEST_URI` value is changed, the `SCRIPT_NAME` value stays the same. Therefor the condition would still recognize if a comment was submitted. Original fix by @2ndkauboy in #589, adapted to v3.
The script is currently checking if the `REQUEST_URI` is containing `wp-comments-post.php`, the default script to handle the submission of a comment. Some security plugins have options to rename this file to disguise that WordPress is used. With this fix, the `SCRIPT_NAME` is used instead. Since many security plugins do use rewrite rules, while the `REQUEST_URI` value is changed, the `SCRIPT_NAME` value stays the same. Therefor the condition would still recognize if a comment was submitted. Original fix by @2ndkauboy in #589, adapted to v3.
The script is currently checking if the `REQUEST_URI` is containing `wp-comments-post.php`, the default script to handle the submission of a comment. Some security plugins have options to rename this file to disguise that WordPress is used. With this fix, the `SCRIPT_NAME` is used instead. Since many security plugins do use rewrite rules, while the `REQUEST_URI` value is changed, the `SCRIPT_NAME` value stays the same. Therefor the condition would still recognize if a comment was submitted. Original fix by @2ndkauboy in #589, adapted to v3.
The script is currently checking if the `REQUEST_URI` is containing `wp-comments-post.php`, the default script to handle the submission of a comment. Some security plugins have options to rename this file to disguise that WordPress is used. With this fix, the `SCRIPT_NAME` is used instead. Since many security plugins do use rewrite rules, while the `REQUEST_URI` value is changed, the `SCRIPT_NAME` value stays the same. Therefor the condition would still recognize if a comment was submitted. Original fix by @2ndkauboy in #589, adapted to v3.
The script is currently checking if the
REQUEST_URI
is containingwp-comments-post.php
, the default script to handle the submission of a comment. Some security plugins have options to rename this file to disguise that WordPress is used.With this fix, the
SCRIPT_NAME
is used instead. Since many security plugins do use rewrite rules, while theREQUEST_URI
value is changed, theSCRIPT_NAME
value stays the same. Therefore, the condition would still recognize if a comment was submitted.Fixes #585