Make WordPress Core

Opened 5 years ago

#49633 new defect (bug)

Trim cookie paths

Reported by: kevin-brent's profile Kevin Brent Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3.2
Component: Login and Registration Keywords: needs-patch
Focuses: Cc:

Description

I had just migrated a WP website that was very old. I encountered an issue that took several hours to debug.

The site was on PHP 5.6 and I updated everything to use PHP 7.3. At PHP 5.6 this was not an issue, but was at PHP 7.3.

The site seemed to be loading fine. No errors in the PHP error logs. However, I was not able to login to the WP Admin. After I defined error logging true. I get this:
https://kevinbrent.com/images/1.png

After several hours of debugging I found this:
https://kevinbrent.com/images/2.png

I was able to fix this in the DB. But, feel that WP could simply trim

spaces from cookie paths since they are not allowed by PHP.

https://kevinbrent.com/images/3.png

There are 3 constants that require this attention.

COOKIEPATH
SITECOOKIEPATH
PLUGINS_COOKIE_PATH

Attachments (3)

Screen Shot 2020-03-11 at 1.51.19 PM.png (682.6 KB) - added by Kevin Brent 5 years ago.
Screen Shot 2020-03-11 at 5.57.10 PM.png (48.2 KB) - added by Kevin Brent 5 years ago.
Screen Shot 2020-03-12 at 8.40.55 AM.png (174.8 KB) - added by Kevin Brent 5 years ago.

Download all attachments as: .zip

Change History (3)

Note: See TracTickets for help on using tickets.