PKP Bugzilla – Bug 8014
Spaces in base path lead to broken cookie paths.
Last modified: 2013-04-12 14:15:04 PDT
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.
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.
Looks good, and comprehensive; thanks, Michael!
Fixed base path encoding issues https://github.com/pkp/pkp-lib/commit/e2768690b9df88902e30981d238d0b7b64a667d4
Fixed base path encoding issues https://github.com/pkp/pkp-lib/commit/05481cdc4bfdb7d0dc79e3fe6029f96113a40ccb
use callback for PHP < 5.3 compatibility https://github.com/pkp/pkp-lib/commit/afa7af3ecb2eee197f64d22db8f4f0b50fb9700c
use callback for PHP < 5.3 compatibility https://github.com/pkp/pkp-lib/commit/81a9f870bc33c2e489de9c1463c2c7e60b0b3e16
Add more comments, add issue current operation redirection https://github.com/pkp/ojs/commit/b32156f0d63a112bd948fd46d4b67b29a330695c