-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
Unused 'VALIDATOR_SESSION_EXPIRE_TIMESTAMP' #2826
Comments
Mhh, this code has been removed with #546 and was added to https://github.com/OpenMage/magento-lts/releases/tag/v19.4.17. Can you please add some information? |
that constant isnt unused, its used (not by the constant sadly) here:
(original core but since 'session_expire_timestamp' (or rather 'VALIDATOR_SESSION_EXPIRE_TIMESTAMP') isnt set anymore it results in a php warning. (accessing inaccessible array key) openmage:
so I guess the issue title is wrong |
Thanks for making it more clear :) |
Do you have a better title? :D |
No. Btw .. assigned @colinmollenhour b/c he should know best about this changes. Hoping for review. |
Ahh yes, this should have been removed. Any reason this can't just be like so?
Is it trying to back-date the timestamp to when the session was started initially? It seems this wouldn't be accurate and I fail to see the value in it.. |
I've no idea whats the reason behind that chosen "creationDate". Probably CURRENT_TIMESTAMP will suffice. |
After investigating further it seems this is meant to invalidate other sessions whenever a customer changes their password. I pushed PR #2916 for further discussion/review. |
commit 3c433b1 Merge: cccf1a6 35195f0 Author: Ng Kiat Siong <[email protected]> Date: Mon Feb 27 15:52:17 2023 +0800 Merge branch '1.9.4.x' into unused-validator-session-expire-timestamp-2826 commit cccf1a6 Author: Colin Mollenhour <[email protected]> Date: Mon Jan 9 15:44:18 2023 -0500 Fix session renew timestamp should be updated when customer changes password. Fixes OpenMage#2826
Preconditions (*)
Steps to reproduce (*)
$passwordCreatedTime = $this->_checkoutSession->getSessionValidatorData()['session_expire_timestamp']
does not exist in arrayVALIDATOR_SESSION_EXPIRE_TIMESTAMP
wasnt used. In the original core I saw this piece of code:$parts[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP] = time() + $this->getCookie()->getLifetime();
in\Mage_Core_Model_Session_Abstract_Varien::getValidatorData
Expected result (*)
Actual result (*)
The text was updated successfully, but these errors were encountered: