Skip to content

Commit 82a40d6

Browse files
committed
Requesting wp-comments-post.php with GET should return 405. Props Mike Little. fixes WordPress#3797
git-svn-id: https://develop.svn.wordpress.org/trunk@5128 602fd350-edb4-49c9-b593-d223f7449a82
1 parent ff859fc commit 82a40d6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

wp-comments-post.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
<?php
2+
if ($_SERVER["REQUEST_METHOD"] != "POST") {
3+
header('Allow: POST');
4+
header("HTTP/1.1 405 Method Not Allowed");
5+
header("Content-type: text/plain");
6+
exit;
7+
}
28
require( dirname(__FILE__) . '/wp-config.php' );
39

410
nocache_headers();

0 commit comments

Comments
 (0)