vienalatina/apps/board
Claude 6acc8922b1
Phase D: public profiles, without risking the public site
A member fills in a bio, links and a photo, ticks a box, and has a page at
vienalatina.com/su-nombre. Until they tick it there is no page, and an
unpublished profile 404s exactly like a name that was never a member.

The routing was the dangerous part and it is not solved by a list. The
original plan reserved Hugo's paths in the Caddyfile, which is wrong the
first time the site grows one, and the failure is a member's page
silently shadowing part of vienalatina.com. Instead Caddy forwards a
request only when the path is a single segment, is not /comunidad, and
Hugo has built nothing there — `not file` with try_files. The static
site wins every collision because the filesystem answers the question,
so the rule cannot drift. A member called "de" shadows nothing; their
profile is merely unreachable, which is why such names are refused at
sign-up: to protect the member, not the site.

An unknown name 404s from the app and handle_response turns that into
the site's own 404.html, so the public site keeps its error page and the
app never needs a public-facing one. Both directives verified against
Caddy's documentation source, since caddyserver.com is unreachable here.

Links are the injection surface on a public page: anything whose scheme
is not http or https is dropped, which is asserted against javascript:,
data: and vbscript:, including a leading-space variant. They render with
rel="nofollow noopener".

The photo is public, which the existing upload code deliberately is not,
so it gets its own route that serves a file only while a published
profile points at it. Unpublishing takes the picture down with the page,
and a private board image cannot be fetched through it — both tested.

The page does not extend base.html: that is the members-area chrome, and
rendering a public page inside it would put "Área privada" and a Salir
button on something anybody can read. It repeats the brand colours
instead of sharing them, because Hugo fingerprints its stylesheet — a
deliberate duplicate, named as one, with the source of truth in a
comment.

Migration 3 adds the columns. 231 tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn
2026-09-29 13:22:43 +00:00
..
static Let members post pictures, and back them up 2026-09-28 09:02:18 +00:00
templates Phase D: public profiles, without risking the public site 2026-09-29 13:22:43 +00:00
tests Phase D: public profiles, without risking the public site 2026-09-29 13:22:43 +00:00
__init__.py Add a members area: roles and an internal board 2026-09-22 10:57:18 +00:00
app.py Phase D: public profiles, without risking the public site 2026-09-29 13:22:43 +00:00
auth.py One front door: the members area owns its own logins 2026-09-29 08:25:25 +00:00
board.py Let members post pictures, and back them up 2026-09-28 09:02:18 +00:00
content.py One front door: the members area owns its own logins 2026-09-29 08:25:25 +00:00
db.py Phase C: private messages, with blocking and photos 2026-09-28 16:10:52 +00:00
gitea.py One front door: the members area owns its own logins 2026-09-29 08:25:25 +00:00
invites.py Let members get a password of their own 2026-09-25 17:49:39 +00:00
mail.py Let members get a password of their own 2026-09-25 17:49:39 +00:00
members.py Phase D: public profiles, without risking the public site 2026-09-29 13:22:43 +00:00
messages.py Phase C: private messages, with blocking and photos 2026-09-28 16:10:52 +00:00
migrations.py Phase D: public profiles, without risking the public site 2026-09-29 13:22:43 +00:00
passwords.py One front door: the members area owns its own logins 2026-09-29 08:25:25 +00:00
profiles.py Phase D: public profiles, without risking the public site 2026-09-29 13:22:43 +00:00
render.py Add a members area: roles and an internal board 2026-09-22 10:57:18 +00:00
requirements.txt Write the site from the members area instead of Decap 2026-09-25 15:07:31 +00:00
schema.sql Phase D: public profiles, without risking the public site 2026-09-29 13:22:43 +00:00
security.py Add a members area: roles and an internal board 2026-09-22 10:57:18 +00:00
uploads.py Phase C: private messages, with blocking and photos 2026-09-28 16:10:52 +00:00
wsgi.py Add a members area: roles and an internal board 2026-09-22 10:57:18 +00:00