leonidnk Posted December 6, 2021 Share Posted December 6, 2021 (edited) Hi, I use version 1.7.8.1 Works very well. However, very often I got message "Invalid token: direct access to this link may lead to a potential security breach. Do you want to display this page? ". Cannot understand why? Please, bring my some idea regarding the problem. Edited December 6, 2021 by leonidnk Better Image (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted December 6, 2021 Share Posted December 6, 2021 If you look at the urls in your backoffice they look something like www.text.com/admin/index.php?controller=AdminDashboard&token=068154d5c60e828cb859a8e55f6f651a The last part (token=....) is your token - a kind of security feature. Prestashop has set a timeout on those tokens. So when you get this message after you had lunch you can just click on "I understand the risk". 2 Link to comment Share on other sites More sharing options...
leonidnk Posted December 6, 2021 Author Share Posted December 6, 2021 41 minutes ago, musicmaster said: If you look at the urls in your backoffice they look something like www.text.com/admin/index.php?controller=AdminDashboard&token=068154d5c60e828cb859a8e55f6f651a The last part (token=....) is your token - a kind of security feature. Prestashop has set a timeout on those tokens. So when you get this message after you had lunch you can just click on "I understand the risk". Thank you very much! Link to comment Share on other sites More sharing options...
Jake Rog Posted January 26, 2022 Share Posted January 26, 2022 I am getting this error with the latest version of theme installed when I am working with a BTCPay module in the admin portal. Please help. Thank you J Link to comment Share on other sites More sharing options...
Joey Posted February 25, 2022 Share Posted February 25, 2022 Is there any way this can be disabled or have the timeout increased? It's so incredibly annoying. I just want to sit down and start working Link to comment Share on other sites More sharing options...
DARKF3D3 Posted July 21, 2022 Share Posted July 21, 2022 On 6/12/2021 at 2:17 PM, musicmaster dice: The last part (token=....) is your token - a kind of security feature. Prestashop has set a timeout on those tokens. I want to increase this timeout. Do you know where I can do that? Link to comment Share on other sites More sharing options...
Ali Samie Posted July 21, 2022 Share Posted July 21, 2022 Hi every one. I have created a module which can help you modify the token lifetime. Just check this in this post. Please rate the post if it is helps you. 1 Link to comment Share on other sites More sharing options...
mr_absinthe Posted March 31, 2023 Share Posted March 31, 2023 Hi, the post and module cannot be found. Link to comment Share on other sites More sharing options...
Ali Samie Posted March 31, 2023 Share Posted March 31, 2023 (edited) 46 minutes ago, mr_absinthe said: Hi, the post and module cannot be found. Hi the module has issues so I made the repo private, i did not have time since then to fix it. the fix is easy with an override you need to change this variablehttps://github.com/PrestaShop/PrestaShop/blob/9718dd5aea9fac3da044c44842de2d9c69b835a6/classes/controller/AdminController.php#L422 public const AUTH_COOKIE_LIFETIME = 3600; Edited March 31, 2023 by Ali Samie (see edit history) Link to comment Share on other sites More sharing options...
mr_absinthe Posted March 31, 2023 Share Posted March 31, 2023 I figured that out but would be better to modify by module instead of hard coding AdminController.php file. BTW the code has changed in 1.7.8.8 /** @var int Auth cookie lifetime */ const AUTH_COOKIE_LIFETIME = 3600; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now