WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#5365 closed defect (bug) (fixed)

Still getting cookie error messages

Reported by: MichaelH Owned by: westi
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.3.1
Component: Administration Keywords:
Focuses: Cc:

Description

Still getting cookie error messages, even after upgrade to 2.3.1. WordPress is in sub-folder so the WordPress address (URL) is different than Blog address (URL).


ERROR: WordPress requires Cookies but your browser does not support them or they are blocked.

ERROR: The username field is empty.

ERROR: The password field is empty.


Also get this after logging out:

ERROR: The username field is empty.

ERROR: The password field is empty.

Successfully logged you out.


Apache version 1.3.37 (Unix)
PHP version 4.4.7
MySQL version 4.1.22-standard

Also see http://wordpress.org/support/topic/144079 for a related report.

Attachments (2)

5365.diff (1.3 KB) - added by xknown 7 years ago.
Check if REQUEST_METHOD is POST
5365.2.diff (1.9 KB) - added by xknown 7 years ago.
Complete patch

Download all attachments as: .zip

Change History (5)

comment:1 @WCityMike7 years ago

Please note that in thread marked http://wordpress.org/support/topic/144079, reporting user has WordPress install in main folder; WordPress address (URL) is same as Blog address (URL).

Also user xknown seems to have offered a patch that successfully stops the error ...

@xknown7 years ago

Check if REQUEST_METHOD is POST

@xknown7 years ago

Complete patch

comment:2 @westi7 years ago

  • Milestone changed from 2.3.2 to 2.4
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

I guess this issue is caused by a plugin but we still need to fix it in the core (2.4 first and then backport to branches/2.3).

I have seen this with Ryan Duff's contact form plugin which sets up stuff in $_POST without checking for a POST request.

Other plugins may do the same.

comment:3 @ryan7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6345]) Check if REQUEST_METHOD is POST rather than cheecking if _POST is empty to determine if we were called via POST. Props xknown. fixes #5365

Note: See TracTickets for help on using tickets.