|
|
report on: cart emptying or checkout reporting cart is empty
Posted 02 May 2012 - 05:04 AM #1
We applied a "fix" from the helpdesk which did not help at all.
We noticed that the majority of problems were coming from users who were using IE8 or IE9, but occasionally other browsers too (most notably phone based browsers).
After heavy logging of the class Session code, we identified the issue as browsers going into compatibility mode based on either the DOCTYPE they were seeing or some html or other "indicator" that they needed to switch to be compatible.
Cs-cart uses the IP address and the User-agent to validate a session. I.e. if a user tries to open a session where the IP address or the User-agent has changed, it will regenerate the session causing the old one to be empty.
For some reason they have turned of IP validation of the session in config.php (commented out in 2.2.4). I'm assuming it's due to twigmo or problems with changes in IP address of mobile devices. But comparison of the last used User-agent and the User-agent reported by the current connection was still performed.
So you'd see a User-agent change from IE-9 to IE-7 (compatibility mode) or from IE-8 to IE-7 and even sometimes from IE-9 to IE-8. And very rarely I observed a change from IE-7 to IE-6.
Whether users are clicking the compatibility button or whether the browsers are doing this automatically, I don't know.
The easiest solution (but the least secure) is to change the line is config.php from
define('SESS_VALIDATE_UA', true); // link session ID with user-agent
to
define('SESS_VALIDATE_UA', false); // link session ID with user-agent
But with IP validation turned off this offers NO session validation at all.
We implemented a limited solution where a check is done before the session validation occurs as to whether the browser is IE-7,8 or 9 and whether it is changing to IE-7, 8 or 9. If that is true then we use the new User-agent so when the compare is done, they come out equivalent and the session is not regenerated.
I can't post the code here without the client's permission since they've paid for the hours to track it down and develop the solution. But I wanted to let folks know what the problem is and how it can be addressed.
If the client gives me permission, I will post the solution as an update.
If you want to test this on your own site, use IE-9 and add something to your cart. Then go click the compatibility button in the address bar and go to a page, then back to your cart. It will be empty.
So bottom line is that session validation has been whittled away to being almost non-existent with the advent of mobile devices and the compatibility mode of all major browsers. Going to have to come up with a different way of avoiding a hijacked session.
Authorized Reseller - Cart licenses: $305 (lowest reseller price)
Custom B2B Development, Consulting and Special Projects (get a quote).
Commercial addons to meet your business and operations needs.
http://www.ez-ms.com
Posted 02 May 2012 - 01:51 PM #2
MSIE8 has Trident/4.0 layout engine included in User Agent. So MSIE8 operating in Compatibility mode (MSIE7) still reports Trident/4.0
MSIE9 has Trident/5.0 layout engine included in User Agent. So MSIE9 operating in Compatibility mode (MSIE7) still reports Trident/5.0
I assume you are doing some kind of check on the user agent for compatibility mode as follows:-
if user agent string contains "MSIE 7.0" then
if user agent string contains "Trident/4.0" then browser is MSIE 8 in compatibility mode
else if user agent string contains "Trident/5.0" then browser is MSIE 9 in compatibility mode
www.ledpolar.com - V2.2.4
Posted 02 May 2012 - 07:46 PM #3
Edit: Note that other browsers will have the same issue if they are switched to a different user-agent (which most can be with addons now) during a particular session. Hence cart contents will be lost (as well as other session data) if that occurs.
Authorized Reseller - Cart licenses: $305 (lowest reseller price)
Custom B2B Development, Consulting and Special Projects (get a quote).
Commercial addons to meet your business and operations needs.
http://www.ez-ms.com
Posted 20 May 2012 - 08:58 PM #4
Thanks!
Jennifer
Posted 21 May 2012 - 02:22 AM #5
If browsers as recent as IE 8 and 9 are having this issue, this seems like it would be a major bug.
We do have customers who call us and say they try to order but "have problems" or "can't get our site to work" but we didn't really think much of it because we have many "seasoned" folks who order our products and often struggle with a computer anyway.
Currently using 2.2.5 Pro, hosted at FutureHosting.com on a dedicated server. For the time being, we have a few micro sites left using the Community Version of CS 2.2.5 that are hosted at Site5.com on a shared package.
Posted 21 May 2012 - 08:12 AM #6
image attached
Attached Files
"Give me a man that tries and fails
than a man that never tries at all"
Posted 21 May 2012 - 08:32 PM #7
define('SESS_VALIDATE_UA', true); // link session ID with user-agent
to
//define('SESS_VALIDATE_UA', true); // link session ID with user-agent
But do note that this will eliminate all session hijacking defenses on the system. So, in doing this, you need to understand that you are allowing your system to be more vulnerable to a session highjack than before.
My personal opionion is that the risk of session hijacking is much much lower than the impact to customers who are using current browser technologies.
You will note that the IP Validation has been disabled by default by cs-cart and I'm assuming that it caused problems with Twigmo or other mobile environments where the user's IP address can change based on their current location.
Authorized Reseller - Cart licenses: $305 (lowest reseller price)
Custom B2B Development, Consulting and Special Projects (get a quote).
Commercial addons to meet your business and operations needs.
http://www.ez-ms.com
Posted 21 May 2012 - 11:09 PM #8
john
"Give me a man that tries and fails
than a man that never tries at all"
Posted 21 May 2012 - 11:49 PM #9
tbirnseth, on 21 May 2012 - 08:32 PM, said:
Currently using 2.2.5 Pro, hosted at FutureHosting.com on a dedicated server. For the time being, we have a few micro sites left using the Community Version of CS 2.2.5 that are hosted at Site5.com on a shared package.
Posted 22 May 2012 - 12:24 AM #10
Quote
http://www.mat-wrigh...lity-quick.html
...under the title of, "Your website isn't IE9 Compatible" and basically just tell the IE9 browser to use one specific version like "emulate IE8"?
Here is a sample from their site but it has NOT been used and I have NOT tried it!
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >Would this stop IE9 or 8 from trying to automatically "fix" the site and then make the customer loose their information?
Currently using 2.2.5 Pro, hosted at FutureHosting.com on a dedicated server. For the time being, we have a few micro sites left using the Community Version of CS 2.2.5 that are hosted at Site5.com on a shared package.
Posted 22 May 2012 - 12:25 AM #11
Currently using 2.2.5 Pro, hosted at FutureHosting.com on a dedicated server. For the time being, we have a few micro sites left using the Community Version of CS 2.2.5 that are hosted at Site5.com on a shared package.
Posted 22 May 2012 - 05:04 AM #12
It took a long time to narrow this one down to what was happening.
Think someone is going to have to come up with a better way to detect/prevent hijacked sessions. IP would have been the best but since cs-cart has not commented in this thread as to why they commented it out, uncommenting it could have unknown results.
I thought I had reported it as a bug and it's been reported under the symptom a couple of times with various fixes that don't really work.
Authorized Reseller - Cart licenses: $305 (lowest reseller price)
Custom B2B Development, Consulting and Special Projects (get a quote).
Commercial addons to meet your business and operations needs.
http://www.ez-ms.com
Posted 22 May 2012 - 05:12 AM #13
Quote
http://www.mat-wrigh...lity-quick.html
I guess I wasn't clear on my point, which is that comparing the user-agent string from the last access to the current access is probably no longer a good indicator of a session hijack attempt. Since cs-cart has taken IP out of the equation (I'm guessing due to Twigmo and other mobile issues) that detecting session hijack is no longer a viable thing to do unless some other criteria than IP and/or user-agent string is used to detect it.
Authorized Reseller - Cart licenses: $305 (lowest reseller price)
Custom B2B Development, Consulting and Special Projects (get a quote).
Commercial addons to meet your business and operations needs.
http://www.ez-ms.com
Posted 23 May 2012 - 03:48 PM #14
http://forum.cs-cart...-cart-is-empty/
I have confirmed this issue with CS-Cart 3.0.1, so the issue does not look like it is fixed in the latest version. If you can confirm it too please be sure to visit the bug tracker link above and click on the "yes" button to let them know that others have the same issue.
Currently using 2.2.5 Pro, hosted at FutureHosting.com on a dedicated server. For the time being, we have a few micro sites left using the Community Version of CS 2.2.5 that are hosted at Site5.com on a shared package.
Posted 28 May 2012 - 04:30 PM #15
Posted 28 May 2012 - 04:38 PM #16
Posted 28 May 2012 - 06:18 PM #17
It has no affect on the cart other than to NOT validate the User-agent as part of the session hijack detection. With both llines commented out, there is effectively no session hijack detection enabled.
Authorized Reseller - Cart licenses: $305 (lowest reseller price)
Custom B2B Development, Consulting and Special Projects (get a quote).
Commercial addons to meet your business and operations needs.
http://www.ez-ms.com
Posted 01 June 2012 - 04:15 PM #18
i contacted cs-cart about it and there answer was to say it's just a browser issue but thats obviously not the case
hopefully we can get a resolution on this as the problem is still there even on the latest release cs-cart 3.0
Posted 01 June 2012 - 06:37 PM #19
Authorized Reseller - Cart licenses: $305 (lowest reseller price)
Custom B2B Development, Consulting and Special Projects (get a quote).
Commercial addons to meet your business and operations needs.
http://www.ez-ms.com
Posted 04 June 2012 - 04:01 AM #20
I haven't been able to get a response from support about this so I am glad I found this thread.
I'll try the config solution for now in the hope a proper fix comes along soon.



