Opened 6 years ago

Closed 6 years ago

#4548 closed defect (bug) (invalid)

De-spamming no spam causes page header to not be loaded

Reported by: Podz Owned by: anonymous
Priority: normal Milestone:
Component: Administration Version: 2.2.1
Severity: normal Keywords:
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)

  • Milestone set to 2.3 (trunk)
  • Version set to 2.3

Mark, Thank you for the detailed steps. Please remember to include WordPress version information. Assuming 2.3

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

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.

I have the same problem with the 2.2.1 version.

http://trac.wordpress.org/ticket/4581

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'] );
}
  • 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.

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'] );
}

Shouldn't this issue be filed on http://dev.wp-plugins.org/ instead? I mean, that's actually where Akismet lives.

  • 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.

Note: See TracTickets for help on using tickets.