-
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
Wrong login/password since v0.5.2 #335
Comments
Can you make sure that you're EDIT: also, what's its value? |
The content of the cookie changes each time I open the browser. (I also have the browser set to clear cookies on exit.) In the web browser, I can see no substantive differences between the cookies when switching between v0.5.1 and v0.5.2. |
Holy crap! In
And let me know if it's working. |
@ArthurHoaro If I add the |
Fixes shaarli#335 - Wrong login/password since v0.5.2 Regression introduced in 06b6660
Thanks @dper for the feedback & @ArthurHoaro for the quick fix ;-) |
👍 well done (? I don't understand what the problem was) |
@nodiscc I believe the situation was this... The trailing |
Exactly. |
Sadly the latest release didn't fix it for me. L388 @ index.php ( €dit: |
I guess I've figured out why the check is failing for me. I've temporarily commented that setting out and was able to log in again. What does that give us? Have a look at the following PHP setting: https://secure.php.net/manual/en/session.configuration.php#ini.session.hash-bits-per-character By A regex which is working for my configuration would be You might also construct the regex on the fly, depending on php.ini settings. |
Thank you guys, for keeping this project up and running ;) |
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>
PR #338 should fix this issue (by the way, |
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>
If I upgrade to v0.5.2, whenever I try to log in I get the popup window showing the error message,
The page at [my domain] says: Wrong login/password.
This started happening recently. If I check out v0.5.1 or earlier, the login process works normally as it has in the past.I take a browser and clear the memory. I load my instance of Shaarli. Let's suppose it's "mydomain.org". Before trying to log in, I examine the cookies. There are two,
shaarli
andshaarli_staySignedIn
.Here is
access.log
when I try to log in and fail.Nothing posts to
error.log
.I have tried using both Iceweasel (Firefox) and Chromium. I have also tried enabling 3rd party cookies. The results are the same. Let me know if there's any other information I can provide.
The text was updated successfully, but these errors were encountered: