Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
SCRIPT_NAME
instead of REQUEST_URI
to check path
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
- Loading branch information