Summary: | Web Access login crashes if cookies are disabled | ||
---|---|---|---|
Product: | ThinLinc | Reporter: | Samuel Mannehed <samuel> |
Component: | Web Access | Assignee: | Bugzilla mail exporter <bugzilla-qa> |
Status: | NEW --- | ||
Severity: | Normal | CC: | adaha |
Priority: | P2 | Keywords: | upstream |
Version: | trunk | ||
Target Milestone: | LowPrio | ||
Hardware: | PC | ||
OS: | Unknown | ||
See Also: |
https://bugzilla.cendio.com/show_bug.cgi?id=8015 https://bugzilla.cendio.com/show_bug.cgi?id=8191 https://bugzilla.cendio.com/show_bug.cgi?id=8484 |
||
Acceptance Criteria: | |||
Attachments: |
Screenshot showing the JavaScript crash in Microsoft Edge
Screenshot showing the JavaScript crash in Safari |
Description
Samuel Mannehed
Upstream noVNC report: https://github.com/novnc/noVNC/issues/1577 Created attachment 1072 [details]
Screenshot showing the JavaScript crash in Safari
The issue stems from the fact that disabling "cookies" in the browsers will also disable the JavaScript feature called "localStorage". Our code isn't written in a way that handles localStorage being blocked like this, thus the crash. In practice, we don't NEED localStorage, it's only used for user preferences. We could easily fall back on the default values here. However, it's worth noting bug 8015 here, until that one is fixed it's impossible to use Web Access with cookies disabled. This leads to the conclusion that the best way forward here is to present a better error message to the user. Google's services like calendar.google.com and gmail.com don't work with cookies disabled. The error shown by Google is:
> Cookies are disabled
>
> Your browser has cookies disabled. Make sure your cookies are enabled and try again. Learn more
After the noVNC vendor drop, disabling cookies will no longer trigger a crash. Instead, I get a "Failed to connect to server" message. As mentioned in comment #3, it would be nice to display a better message if cookies/localStorage are disabled. I tried disabling localStorage on firefox (about:config -> dom.storage.enabled = false).
Logging in with web access will trigger an error:
> ThinLinc Web Access encountered an error:
>
> localStorage is null
> localStorageGet@https://10.48.2.23:300/app/webutil.js:213:9
> readSetting@https://10.48.2.23:300/app/webutil.js:159:17
> start@https://10.48.2.23:300/app/ui.js:120:21
|