Ticket #5365 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Still getting cookie error messages

Reported by: MichaelH Assigned to: 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 (1.3 kB) - added by xknown on 11/19/07 21:30:23.
Check if REQUEST_METHOD is POST
5365.2.diff (1.9 kB) - added by xknown on 11/19/07 21:42:31.
Complete patch

Change History

11/19/07 21:18:14 changed by WCityMike

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

11/19/07 21:30:23 changed by xknown

  • attachment 5365.diff added.

Check if REQUEST_METHOD is POST

11/19/07 21:42:31 changed by xknown

  • attachment 5365.2.diff added.

Complete patch

11/20/07 18:49:46 changed by westi

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

11/27/07 08:03:33 changed by ryan

  • 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