Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#4548 closed defect (bug) (invalid)

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

Reported by: Podz Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.2.1
Component: Administration Keywords:
Focuses: Cc:


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)

#1 @foolswisdom
8 years ago

  • 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

#2 @JeremyVisser
8 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:


#3 @JeremyVisser
8 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.

#4 @jaunis
8 years ago

I have the same problem with the 2.2.1 version.


#5 @Otto42
8 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 @Otto42
8 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 @Otto42
8 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 @JeremyVisser
8 years ago

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

#9 @Nazgul
8 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.

Note: See TracTickets for help on using tickets.