Opened 16 years ago
Closed 16 years ago
#4548 closed defect (bug) (invalid)
De-spamming no spam causes page header to not be loaded
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.2.1 |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
In the blog click Comments > Akismet Spam
Scroll to bottom of the page
Click to de-spam comments
A style-free page is then created.
Change History (9)
#2
@
16 years ago
I reproduce this bug on my WPMU 1.2.2 install all the time. I find it comes from ?noheader=true
being erroneously appended to the query URL for some reason.
I have absolutely no idea why you would need a noheader
parameter, but it's there, and it uses it for some weird reason.
This is my what my address bar looks like when I reproduce it:
https://jeremy.sunriseroad.net/wp-admin/edit-comments.php?page=akismet-admin&noheader=true&deleted=all
#3
@
16 years ago
Oh, and you mention de-spamming comments triggers the bug for you. For me, I can trigger it by purging my spam folder with the "Delete all" button also.
#5
@
16 years ago
In the akismet_caught() function, this check is being performed:
if (isset($_POST['submit']) && 'recover' == $_POST['action'] && ! empty($_POST['not_spam']))
When you click the Not Spam button without anything checked, then the first two items pass, but the !empty check fails, and so none of the functionality in there takes effect, including the redirect. So you're brought right back to the same main Akismet screen, but with noheader set (thinking that a redirect was imminent), you don't get a header.
This can be corrected by adding this code just below the end of that if statement (but before the delete action check):
if (isset($_POST['submit']) && 'recover' == $_POST['action'] && empty($_POST['not_spam'])) { wp_redirect( $_SERVER['HTTP_REFERER'] ); }
#6
@
16 years ago
- Version changed from 2.3 to 2.2.1
Note: This bug is in all current versions of Akismet, I think. I tested on a 2.2.1 installation.
#7
@
16 years ago
Forgot the nonce check (needed for security reasons):
if (isset($_POST['submit']) && 'recover' == $_POST['action'] && empty($_POST['not_spam'])) { check_admin_referer( $akismet_nonce ); wp_redirect( $_SERVER['HTTP_REFERER'] ); }
#8
@
16 years ago
Shouldn't this issue be filed on http://dev.wp-plugins.org/ instead? I mean, that's actually where Akismet lives.
#9
@
16 years ago
- Milestone 2.3 deleted
- Resolution set to invalid
- Status changed from new to closed
I created http://dev.wp-plugins.org/ticket/679
Closing this one as invalid as it only affects the Akismet plugin, not core.
Mark, Thank you for the detailed steps. Please remember to include WordPress version information. Assuming 2.3