Skip to content

[plugin] CSRF and cookie login#5438

Merged
Hillshum merged 5 commits intonextfrom
plugin/csrf-and-cookie-login
Nov 9, 2025
Merged

[plugin] CSRF and cookie login#5438
Hillshum merged 5 commits intonextfrom
plugin/csrf-and-cookie-login

Conversation

@Hillshum
Copy link
Collaborator

@Hillshum Hillshum commented Nov 9, 2025

Sending the CSRF token allows using OctoDash while logged into OctoPrint. Without that token, requests with the session cookie present get rejected. Additionally, this attempts to log in using only the session cookie, allowing that to work without setting up an API key.

This also expands error logging on the login flow.

After implementing this, I've realized that this means there's two places where headers are set: the interceptor and the getHTTPHeaders method. I'll resolve that eventually.

See #4927 for more info regarding the plugin migration work.

@Hillshum Hillshum merged commit 0479da7 into next Nov 9, 2025
3 checks passed
@Hillshum Hillshum deleted the plugin/csrf-and-cookie-login branch November 9, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant