Post by eeeee » Sun Jul 28, 2013 3:13 pm

New to Opencart...

Does Opencart always pass the session token in the URLs?

Why doesn't it use a cookie to maintain the session?

I thought I was getting logged out each time I open a new tab and load the admin dashboard, but I realised its because I'm dropping the session token from the URL.

Newbie

Posts

Joined
Thu Jul 25, 2013 10:06 am

Post by Qphoria » Sun Jul 28, 2013 10:46 pm

This was a security fix added back in 1.4.8
There was a possibility that if you were logged in as admin on your site... and someone send a phishing link to your email... it could be a link that does something in your admin. Basically tricking you into running something on your own site when clicked on.

So the token was added so that you it couldn't be exploited. It is a PITA.. but security rules all

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by eeeee » Mon Jul 29, 2013 12:43 pm

I see. Thank you.

Newbie

Posts

Joined
Thu Jul 25, 2013 10:06 am

Post by fos » Thu Jul 17, 2014 4:52 am

Is there any way to disable this feature, it drives me crazy because I always get logout from admin randomly.

fos
New member

Posts

Joined
Sun Jun 29, 2014 12:03 pm

Post by Dhaupin » Thu Jul 17, 2014 5:01 am

Yeah there are ways to do it but it would open you to URL hackeries as src=. The token ensures no one can mask a hypothetical link like "yoursite.com/admin/delete-store" <- missing a token so the url wouldnt work, and the exploiter couldnt guess your token for the session. If it were in a cookie it would be easy to find your token via script or whatever.

Try adding this to your /admin/php.ini to increase lifetime

Code: Select all

session.use_cookies = On
session.use_trans_sid = Off
session.gc_maxlifetime = 172800
Also make sure that when switching between tabs they are the same token or else it will make you log in again eternally between the tabs.

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA
Who is online

Users browsing this forum: No registered users and 30 guests