mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-04-25 04:05:57 +03:00
[GH-ISSUE #749] [BUG] Whoogle Link redirecting to one with cookies disabled #473
Labels
No labels
Fixed (Pending PR Merge)
Stale
bug
enhancement
enhancement
good first issue
help wanted
keep-open
needs more info
pull-request
question
theme
unfortunate
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/whoogle-search#473
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 @fxzzi on GitHub (May 5, 2022).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/749
Hello, I am using a local instance of Whoogle. Navigating the to the page http://localhost:5000/ Works completely fine, but if I try accessing it from my startpage: https://fxzzi.github.io/startpage/ It sends me to the link http://localhost:5000/?cookies_disabled=1
This occurs on Firefox and Librewolf. I am not sure whether it's a problem with Whoogle or Librewolf.
@fxzzi commented on GitHub (May 6, 2022):
This right here.
@onedr0p commented on GitHub (May 7, 2022):
I think @benbusby should document what causes this to happen. What are the causes of cookies being disabled when you have this behind a reverse proxy. It's not very user friendly.
@navhawk80 commented on GitHub (May 9, 2022):
I found this bug since 0.7.0 version. This bug is not presented in old 0.6.0. version. So I'm using 0.6.0 till it will be fixed in 0.7....
@benbusby commented on GitHub (May 10, 2022):
I just pushed a commit that should fix the issue documented here (accessing a Whoogle instance from an external link causing configuration/cookies to be disabled).
The cause of this was the
SameSiteattribute being set tostrict, which disallows session persistence for requests initiated by a third party (see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite#strict). This was originally implemented in a (perhaps misguided) attempt to improve overall security, but came at the cost of breaking functionality when interacting with the app from a third party context. This has been updated to uselaxfor theSameSiteattribute, which will allow access from external links without disrupting configuration/sessions.As far as how this
cookies_disabledstate is reached, session validation occurs as follows:/sessionendpoint, with the previous session id included as a URL param (i.e./session/asdf123)cookies_disabledparam is then appended to subsequent requests to avoid a situation where Flask continuously attempts creating a new session every time that user hits a Whoogle endpoint.cookies_disabledparam attachedIn short, this solution was devised as a way to create a mostly equal "session experience" for users and instance maintainers without A) relying on users to enable Javascript, B) causing runaway session creation for public instance maintainers, and C) allowing users with cookies blocked to still be able to use Whoogle, albeit in a diminished capacity.
Let me know if anyone needs any clarification regarding anything I've mentioned.
@DUOLabs333 commented on GitHub (May 16, 2022):
Thanks! The commit referenced fixed an unrelated bug where the CSS sometimes didn't load. Not sure what cookies had to do with it though.
@hj-collab commented on GitHub (Jun 8, 2022):
@benbusby Facing the same issue with 0.7.3. Any solution?