Skip to content

Upgrade to latest Datasette CSRF mechanism#7

Merged
simonw merged 4 commits into
mainfrom
csrf-changes
Apr 15, 2026
Merged

Upgrade to latest Datasette CSRF mechanism#7
simonw merged 4 commits into
mainfrom
csrf-changes

Conversation

@simonw
Copy link
Copy Markdown
Contributor

@simonw simonw commented Apr 15, 2026

Comment thread tests/conftest.py Outdated
Comment on lines +1 to +5
from datasette.plugins import pm
import datasette_export_database

if not pm.is_registered(datasette_export_database):
pm.register(datasette_export_database, name="datasette_export_database")
Copy link
Copy Markdown
Contributor Author

@simonw simonw Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually even that should not be necessary.

@simonw
Copy link
Copy Markdown
Contributor Author

simonw commented Apr 15, 2026

Manually tested with:

uv run datasette test.db --create -s permissions.export-database true
Screenshot 2026-04-15 at 4 46 32 PM

@simonw
Copy link
Copy Markdown
Contributor Author

simonw commented Apr 15, 2026

Added a test for the case where -s permissions.export-database true for anonymous users (actor_id is None but the signed reference check still passes, which is as designed.)

@simonw simonw merged commit 9021066 into main Apr 15, 2026
10 checks passed
simonw added a commit that referenced this pull request Apr 15, 2026
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