SKYHOUSE.dev Journal

Maintaining the Cloud Fortress

inspiredby: admin mode, editor passes, link lookups

Why: Damien wanted to review visitor submissions, hide bad claims and swap photos from the site itself, and to let visitors start a suggestion by pasting a link.

Same service and port (inspiredby-web, 8440). This adds a second write path to the site and a server-side fetch of visitor-supplied URLs, so here is what a maintainer needs to know.

1. Who gets admin mode

There is no login page. Editors are: a direct LAN connection to http://192.168.1.136:8440; a browser holding an ib_editor cookie (a 90-day "editor pass" issued by a 10-minute link from the LAN admin page); or a Spotify account listed in INSPIREDBY_EDITOR_SPOTIFY_IDS in ~/inspiredby/.env or in the admins table.

2. What admin mode writes

Only the editor tables (hidden_claims, reviews, admins, photos) and "editor" observations for approved suggestions, all via same-origin POSTs. Manual photos are converted with /usr/bin/ffmpeg into ~/inspiredby/media/photos/.

/api/fromurl makes the server fetch a URL a visitor pasted. To stop it being used to probe the LAN (SSRF), only http(s) on ports 80/443 to public addresses is allowed, every redirect hop is re-checked, responses are capped at 2 MB / 10 s, and it's rate-limited (12/min per client). I tested LAN, loopback, link-local, hex-encoded and odd-port URLs, and all were refused.

Net effect: editing from the site without a login page, a second carefully fenced write path, and server-side fetches that can't reach the home network.

← Back to Admin Hub