-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow uppercase letters in PHP sessionid format #336
Conversation
Fixes shaarli#335 - Wrong login/password since v0.5.2 Regression introduced in 06b6660
Nope. Different code versions must have different tags.
http://geek-and-poke.com/geekandpoke/2014/3/3/end-of-working-day Instead, we can:
|
Yep, let's do that. |
Allow uppercase letters in PHP sessionid format
Does that mean a |
Cherry-picking a commit from a branch to another creates a new commit (read: with a different SHA-1 ID), which is not what we want here. The proper way is to rebase the @nodiscc @ArthurHoaro I'm still at work but available on Gitter if you need a hand to release a new Shaarli version ;-) |
Related stackoverflow question
|
The current usage of the In consequence, it should simply be rebased on the latest tag when it is released (its history is kept the same as the master branch). Not to be confused with release branches, where critical bugfixes get backported to all maintained (long-life) revisions; in this case, the commit would be cherry-picked from the mainline (master) to each branch, and most likely be amended for integration. This branching model would not apply well to Shaarli (for now), as we don't provide release branches for long-term support (low relevance for alpha/beta releases). |
Improves shaarli#306 Relates to shaarli#335 & shaarli#336 Issue: - the format of the value returned by `uniqid()` depends on PHP settings - the regex checking the session ID does not cover all cases Fix: - apply a hash function to the session ID (SHA1) See: - http://php.net/manual/en/session.configuration.php#ini.session.hash-function Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Improves shaarli#306 Relates to shaarli#335 & shaarli#336 Duplicated by shaarli#339 Issues: - PHP regenerates the session ID if it is not compliant - the regex checking the session ID does not cover all cases - different algorithms: md5, sha1, sha256, etc. - bit representations: 4, 5, 6 Fix: - regex: support all possible characters - '[a-zA-Z,-]{2,128}' - tests: add coverage for all algorithms & bit representations TODO: - remove `uniqid()` usage See: - http://php.net/manual/en/session.configuration.php#ini.session.hash-function - https://secure.php.net/manual/en/session.configuration.php#ini.session.hash-bits-per-character - http://php.net/manual/en/function.session-id.php - http://php.net/manual/en/function.session-regenerate-id.php - http://php.net/manual/en/function.hash-algos.php Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Improves shaarli#306 Relates to shaarli#335 & shaarli#336 Duplicated by shaarli#339 Issues: - PHP regenerates the session ID if it is not compliant - the regex checking the session ID does not cover all cases - different algorithms: md5, sha1, sha256, etc. - bit representations: 4, 5, 6 Fix: - `index.php`: - remove `uniqid()` usage - call `session_regenerate_id()` if an invalid cookie is detected - regex: support all possible characters - '[a-zA-Z,-]{2,128}' - tests: add coverage for all algorithms & bit representations See: - http://php.net/manual/en/session.configuration.php#ini.session.hash-function - https://secure.php.net/manual/en/session.configuration.php#ini.session.hash-bits-per-character - http://php.net/manual/en/function.session-id.php - http://php.net/manual/en/function.session-regenerate-id.php - http://php.net/manual/en/function.hash-algos.php Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Improves shaarli#306 Relates to shaarli#335 & shaarli#336 Duplicated by shaarli#339 Issues: - PHP regenerates the session ID if it is not compliant - the regex checking the session ID does not cover all cases - different algorithms: md5, sha1, sha256, etc. - bit representations: 4, 5, 6 Fix: - `index.php`: - remove `uniqid()` usage - call `session_regenerate_id()` if an invalid cookie is detected - regex: support all possible characters - '[a-zA-Z,-]{2,128}' - tests: add coverage for all algorithms & bit representations See: - http://php.net/manual/en/session.configuration.php#ini.session.hash-function - https://secure.php.net/manual/en/session.configuration.php#ini.session.hash-bits-per-character - http://php.net/manual/en/function.session-id.php - http://php.net/manual/en/function.session-regenerate-id.php - http://php.net/manual/en/function.hash-algos.php Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Improves shaarli#306 Relates to shaarli#335 & shaarli#336 Duplicated by shaarli#339 Issues: - PHP regenerates the session ID if it is not compliant - the regex checking the session ID does not cover all cases - different algorithms: md5, sha1, sha256, etc. - bit representations: 4, 5, 6 Fix: - `index.php`: - remove `uniqid()` usage - call `session_regenerate_id()` if an invalid cookie is detected - regex: support all possible characters - '[a-zA-Z,-]{2,128}' - tests: add coverage for all algorithms & bit representations See: - http://php.net/manual/en/session.configuration.php#ini.session.hash-function - https://secure.php.net/manual/en/session.configuration.php#ini.session.hash-bits-per-character - http://php.net/manual/en/function.session-id.php - http://php.net/manual/en/function.session-regenerate-id.php - http://php.net/manual/en/function.hash-algos.php Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Fixes #335 - Wrong login/password since v0.5.2
Regression introduced in 06b6660
@virtualtam @nodiscc This is a critical bug. Should we recreate v0.5.2 with this commit included?