Skip to content

Stronger cookie check#649

Merged
pcraig3 merged 2 commits intomainfrom
stronger-cookies
Mar 11, 2026
Merged

Stronger cookie check#649
pcraig3 merged 2 commits intomainfrom
stronger-cookies

Conversation

@pcraig3
Copy link
Collaborator

@pcraig3 pcraig3 commented Mar 10, 2026

Summary

This PR changes how cookies are set for the Grabzit download feature.

Details

This PR tighten GrabzIt's cookie scoping for DOCX export by binding custom cookies to the export URL host instead of the incoming request host, and adds validation/logging to fail fast when the host or session
context does not match.

This (hopefully) prevents cross-domain cookie mixups between dev and prod that were causing GrabzIt to send the wrong sessionid/csrftoken and get redirected to login instead of exporting the document.

Another thing this PR does is that it adds a title element to the export template.

I am pretty sure this PR solves #646

Tighten GrabzIt cookie scoping for DOCX export by binding custom cookies
to the export URL host instead of the incoming request host,
and add validation/logging to fail fast when the host or session
context does not match.

This prevents cross-domain cookie mixups between dev and prod that
were causing GrabzIt to send the wrong sessionid/csrftoken and get
redirected to login instead of exporting the document.
It doesn't really need one, but it looks nicer this way.
@pcraig3 pcraig3 changed the title [WIP] stronger cookie check Stronger cookie check Mar 11, 2026
@pcraig3 pcraig3 merged commit f1cb15f into main Mar 11, 2026
2 checks passed
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