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

Bug report: Downloadable version not working on Safari due to unavailable localStorage #174

Closed
jmiserez opened this issue Aug 3, 2017 · 7 comments

Comments

@jmiserez
Copy link

jmiserez commented Aug 3, 2017

Summary

The downloadable cyberchef.htm page does not load when local storage is not available. Unfortunately, Safari on Mac does not seem to support local storage for offline files. I get the following error in the JS console:

[Error] SecurityError (DOM Exception 18): The operation is insecure.
	loadLocalStorage (cyberchef.htm:101:1316857)
	setup (cyberchef.htm:101:1313376)
	e (cyberchef.htm:101:959968)

and CyberChef just remains at the loading screen and never loads. This is with regular browsing mode, not private browsing. The same downloaded file works fine in Chrome.

Possible solutions

CyberChef should load even when local storage is not available. I'm unsure if this is feasible.

Environment

Browser/OS: Safari 10.1.1 (12603.2.4) that is shipping with macOS 10.12.5 (latest)

  • Version: 5.12.4
  • Compile time: 03/08/2017 12:08:51 UTC
  • User-Agent:
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4
@mattnotmitt
Copy link
Collaborator

I'm not sure how we can solve this. Safari isn't one of our offically supported browsers so I can't advise you much further than that.

@jmiserez
Copy link
Author

jmiserez commented Aug 3, 2017

@artemisbot I see, thanks for the hint. I guess we can close this issue as wontfix then.

@jmiserez jmiserez closed this as completed Aug 3, 2017
@n1474335
Copy link
Member

n1474335 commented Aug 4, 2017

Whilst Safari isn't an officially supported browser, this does seem like something that should be fixed. LocalStorage is used to store saved recipes, user options and favourites. Fundamentally the app should still be able to function without these things. If Safari is blocking localStorage for local files, it's possible that other browsers will make the same decision in future.

I'm re-opening this issue as I feel it's something we should at least take a look at to see how much work it would entail. It might be a really quick fix, or it might be impractical.

Thanks for raising the issue and the detailed description of the problem.

@n1474335 n1474335 reopened this Aug 4, 2017
@n1474335 n1474335 added the bug label Aug 4, 2017
@MichalStaruch
Copy link

Similar problem can be observed on Chrome 61 (which is supported browser) with enabled "Block third-party cookies" option in Content Settings -> Cookies. Launching cyberchef.html from local filesystem results then in cyberchef.htm:101 throwing:
Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document. at p.loadLocalStorage (file:///C:/utils/cc/cyberchef.htm:101:1445128) at p.setup (file:///C:/utils/cc/cyberchef.htm:101:1441605) at HTMLDocument.e (file:///C:/utils/cc/cyberchef.htm:101:1107206)

and never-ending loading animation.

Chrome 61.0.3163.79, CyberChef 5.19.3.

@n1474335
Copy link
Member

@MichalStaruch Thanks for the details, I'll prioritise this more highly.

@n1474335
Copy link
Member

This should be fixed now. Let me know if it's still causing problems.

@MichalStaruch
Copy link

@n1474335 Works fine in v6.0.2. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants