Ticket #5365 (closed defect (bug): fixed)

Opened 4 years ago

Last modified 4 years ago

Still getting cookie error messages

Reported by: MichaelH Owned by: westi
Priority: normal Milestone: 2.5
Component: Administration Version: 2.3.1
Severity: normal Keywords:
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

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

Change History

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

xknown4 years ago

Check if REQUEST_METHOD is POST

xknown4 years ago

Complete patch

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

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   ryan4 years ago

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

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