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

include xsrf token in event stream request #346

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

minrk
Copy link
Member

@minrk minrk commented Mar 28, 2024

JupyterHub 4.1 increases strictness of xsrf checks (omitting it is no longer allowed on GET requests that are Sec-Fetch: cors, which includes this EventStream).

closes #344

@yuvipanda
Copy link
Contributor

Thanks @minrk

I suspect the tests are failing because we need to now also specify the XSRF token in

query_args = {"token": "secret"}
. But given that's coming from a python client, I'd have thought that it shouldn't have issues as long as the token is present?

@minrk
Copy link
Member Author

minrk commented Mar 29, 2024

Correct, if a token is present, xsrf shouldn't be checked. I'll have a look

JupyterHub 4.1 increases strictness of xsrf checks

omitting it is no longer allowed on `Sec-Fetch: cors` requests
@minrk minrk force-pushed the xsrf-event-stream branch from 9b7813c to 1ceca4a Compare March 29, 2024 07:38
@minrk
Copy link
Member Author

minrk commented Mar 29, 2024

403 was because I had an unrelated change in here to turn 302 into 403 while I was testing (302 to login on the EventSource isn't going to work). I've pulled that out and will do a separate PR.

@minrk
Copy link
Member Author

minrk commented Mar 29, 2024

Failure was unrelated, pulled out to #347

@consideRatio consideRatio reopened this Mar 29, 2024
@consideRatio consideRatio merged commit 34f7dee into jupyterhub:main Mar 29, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nbgitpuller not working on JupyterHub after latest updates
3 participants