mirror of
https://github.com/requarks/wiki.git
synced 2026-03-02 22:57:36 -05:00
Wiki.js breaks and displays blank page when cookies are denied #1155
Labels
No labels
BETA
BETA
accessibility
backlog
bug
can't replicate
contrib-easy
contrib-hard
contrib-medium
deferred
documentation
duplicate
duplicate
editors
enhancement
invalid
localization
migrate
ui
under review
v3
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/wiki#1155
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fireundubh on GitHub (Feb 26, 2020).
Originally assigned to: @NGPixel on GitHub.
Using Firefox 73, setting the browser to deny all cookies breaks Wiki.js v2.1.x and a blank page is displayed to the user.
Another user reported the same issue in Chrome when that browser is set to deny all cookies.
I reproduced the issue in Vivaldi by setting the browser to deny all cookies. I could not reproduce the issue in Vivaldi when using uMatrix to block cookies, however. In that case, the browser may be accepting the cookie, which is good enough for Wiki.js, but the extension intercepts and discards it.
Wiki.js should not require a cookie for unauthenticated guest users.
@fireundubh commented on GitHub (Feb 26, 2020):
A cursory look at the source suggests that you're assuming the
jwtcookie is available, but if it's not (as it wouldn't be when cookies are denied at the lower browser level), the code that operates on thejwtcookie is probably just throwing exceptions. There doesn't seem to be any logging to file so I can't check that.@cadpnq commented on GitHub (Feb 26, 2020):
The issue appears to be cookie-adjacent and not actually a cookie. By disabling cookies you are also disallowing access to local storage. At least one of the dependencies here (namely
i18next-localstorage-backend) relies on local storage to function. Without that it just throws an error and never gets around to showing anything on the page.I wouldn't categorize this as a code issue in this project.
@NGPixel commented on GitHub (Feb 27, 2020):
Most likely an issue with the localstorage indeed. A bug nonetheless...