fix(webapp): read-only routes no longer write (#1206) #1294
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/1206-read-routes-write"
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?
Closes #1206.
list_creations(sheet_creation.waiting) filters creations idle pastKEEP_FORin its query instead of deleting them. A daily Beat task,purge_stale_sheet_creations(purge_all_stale), does the deleting.clear_stalestays for the POSTstartroute.download_lore_imageno longer moves a pre-#894 public picture or rewritesimage_url. It serves the private file byX-Accel-Redirect, or a not-yet-swept legacy file in place viaFileResponse, after the same audience check. A daily, idempotent sweep (sweep_legacy_lore_images→move_legacy_image) moves the file and rewrites the URL. If a private copy already exists, the public one is removed._content_relativecalled the same move two helpers down. It's now_content_response, and serves in place too.test_get_routes_do_not_write.py: the allow-list is down toauth.callback,auth.discord_linkand the two content-pack exports.Security, reviewed: the legacy file's path comes only from the route's typed
campaign_id/entry_id(_legacy_dir), never fromimage_url, so a request can't steer it elsewhere. The reader's audience check runs first, unchanged.Tests:
Checked on docker-test:
-m "not synthetic"): 10,391 passed, no failures.Note: until the first sweep runs after deploy, an unswept legacy picture is served by the backend rather than nginx. The deploy can run the sweep at once:
celery -A app.tasks.celery_app call app.tasks.reminder_tasks.sweep_legacy_lore_images.🤖 Generated with Claude Code