Bug 8014

Summary: Spaces in base path lead to broken cookie paths.
Product: OJS Reporter: Alec Smecher <alec>
Component: GeneralAssignee: PKP Support <pkp-support>
Status: RESOLVED FIXED    
Severity: normal CC: michael.thessel, primoz.svetek
Priority: P3    
Version: 3.0a   
Hardware: All   
OS: All   
Version Reported In: Also Affects:

Description Alec Smecher 2012-11-09 09:04:38 PST
Spaces in base path lead to broken cookie paths. If an installation contains a space in the name of its base directory, then the cookie path is improperly encoded and cookies will not be returned to the system on subsequent requests. Result: it's impossible to log in.
Comment 1 Michael Thessel 2013-03-13 10:15:55 PDT
This is more a general encoding issue not just for spaces. A URL path can contain the following unencoded characters:

A-Za-z0-9-._~!$&'()*+,;=:@

The remaining characters need to be encoded. I changed the getBasePath() function to encode these remaining characters. I tested this with a variety of paths with special characters. Login as well as browsing the site showed no problems.
Comment 2 Alec Smecher 2013-03-13 16:12:38 PDT
Looks good, and comprehensive; thanks, Michael!
Comment 3 Alec Smecher 2013-03-13 16:15:02 PDT
Fixed base path encoding issues
https://github.com/pkp/pkp-lib/commit/e2768690b9df88902e30981d238d0b7b64a667d4
Comment 4 Michael Thessel 2013-03-13 16:15:03 PDT
Fixed base path encoding issues
https://github.com/pkp/pkp-lib/commit/05481cdc4bfdb7d0dc79e3fe6029f96113a40ccb
Comment 5 Jason Nugent 2013-03-14 06:45:03 PDT
use callback for PHP < 5.3 compatibility
https://github.com/pkp/pkp-lib/commit/afa7af3ecb2eee197f64d22db8f4f0b50fb9700c
Comment 6 Jason Nugent 2013-03-14 09:10:02 PDT
use callback for PHP < 5.3 compatibility
https://github.com/pkp/pkp-lib/commit/81a9f870bc33c2e489de9c1463c2c7e60b0b3e16
Comment 7 beghelli 2013-04-12 14:15:04 PDT
Add more comments, add issue current operation redirection
https://github.com/pkp/ojs/commit/b32156f0d63a112bd948fd46d4b67b29a330695c
Comment 8 Michael Thessel 2014-01-15 08:18:02 PST
Fixed base path issue in IIS
https://github.com/pkp/pkp-lib/commit/76521043e2a583b0acd0cdb50ad39a66376b8424
Comment 9 Jason Nugent 2014-01-15 08:26:02 PST
Fixed base path issue in IIS
https://github.com/pkp/pkp-lib/commit/e6d3dd17cbe35ea1231219183105cf9b4d516493