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

Wiki.js breaks and displays blank page when cookies are denied #1538

Open
fireundubh opened this issue Feb 27, 2020 · 3 comments
Open

Wiki.js breaks and displays blank page when cookies are denied #1538

fireundubh opened this issue Feb 27, 2020 · 3 comments
Assignees

Comments

@fireundubh
Copy link

@fireundubh fireundubh commented Feb 27, 2020

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.

2020-02-26 17_07_01

@fireundubh
Copy link
Author

@fireundubh fireundubh commented Feb 27, 2020

A cursory look at the source suggests that you're assuming the jwt cookie 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 the jwt cookie is probably just throwing exceptions. There doesn't seem to be any logging to file so I can't check that.

@cadpnq
Copy link

@cadpnq cadpnq commented Feb 27, 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
Copy link
Member

@NGPixel NGPixel commented Feb 27, 2020

Most likely an issue with the localstorage indeed. A bug nonetheless...

@NGPixel NGPixel self-assigned this Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.