Skip to content
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

Cookies causing security exception in iPhone #3682

Closed
anonymous-matomo-user opened this issue Jan 17, 2013 · 3 comments
Closed

Cookies causing security exception in iPhone #3682

anonymous-matomo-user opened this issue Jan 17, 2013 · 3 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@anonymous-matomo-user
Copy link

We're seeing the following message on iPhone while tracking mobile site traffic.
"Error: SECURITY_ERR:DOM Exception 18"

I've debugged the javascript and it seems that although we explicitly set disableCookies in our init code, Piwik still tries to access cookies (if only to expire them). For now I've just wrapped the offending code in a try/catch, but I'd appreciate a more elegant fix in a future release.


if (configCookiesDisabled) {
   // Temporarily allow cookies just to delete the existing ones
   configCookiesDisabled = false;
   try{  
      setCookie(idname, '', -86400, configCookiePath, configCookieDomain);
      setCookie(sesname, '', -86400, configCookiePath, configCookieDomain);
      setCookie(cvarname, '', -86400, configCookiePath, configCookieDomain);
      setCookie(refname, '', -86400, configCookiePath, configCookieDomain);
   }catch(err){}
   configCookiesDisabled = true;
}

Perhaps another parameter to deal with removing existing cookies would be a more explicit approach? configCookiesDisabled && configDeleteCookies ?

Thanks
Keywords: javascript cookie

@mattab
Copy link
Member

mattab commented Jan 17, 2013

can you give background on what is "Error: SECURITY_ERR:DOM Exception 18" and why it could be important to work around this issue ? who does it impact exactly? we never got this report before. thx

@robocoder
Copy link
Contributor

Why do you disable cookies? Is the iphone browsing a local file using a file:// url?

@mattab
Copy link
Member

mattab commented Feb 21, 2013

please reopen if you read this and care to provide more info :-)

thanks

@anonymous-matomo-user anonymous-matomo-user added this to the 1.11 - Piwik 1.11 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

3 participants