fix(webapp): wiki text draws only uploaded pictures (#1138) #1161
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/1138-wiki-pictures-own-uploads"
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 #1138 (D297).
A picture in page text is drawn only when its address is one of Quest Board's own upload routes. Anything else stops being fetched by every reader's browser.
wiki/ownPicture.js, mirrored inimage_service.is_own_picture_url):/api/campaigns/<id>/files/<id>and/api/campaigns/<id>/lore/<id>/image, anchored. An outsidehttp(s)address becomes an ordinary link named by its alt text; anything else stays as typed text.extractAtomsinwikiText.js, so everyWikiTextuser gets it; a page's own picture goes through a newPicture.jsx..PATCH image_urlthat is not own or legacy is a 422; an import drops one;sanitize_markdownturns Markdown pictures into links.img-src 'self' data: https:becomesimg-src 'self'.No migration, no bot contract change.
Verified
On
docker-test: backendtests/wiki,tests/export,test_campaigns.py, the reference adapters and the new tests (2646 passed); ruff; changelog check;frontend-prodimage built and its served CSP header read. Frontend lint clean. The full vitest run had 93 failures under a host load of about 40; every failing file passed on a two-worker rerun, but the whole suite was not rerun in one go.Not run: the new journey
e2e/j8-wiki-pictures.spec.js; no page was loaded in a browser against the new CSP (render check of the map, page pictures and the editor still to do before merging).Found on the way, not fixed here
GET /auth/logoutends the session, so a plain link to it logs a reader out. Several other GET routes write. To be filed separately.🤖 Generated with Claude Code