arean / Porjay Public

Porjay: distributed version control and code hosting, built on Fossil SCM

Check-in [3c2c7c3e6b]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:hub: password reset that survives real inboxes

A user asked for a reset, then clicked the older reset email in the same Gmail thread: that link had expired (60 minutes) and was also deleted by the new request, so the page said only "This link doesn't work".

- Earlier reset links keep working until they expire or one of them is used (newest 5 kept); using one retires the rest. Links last 3 hours. - Dead links say why (expired / already used / cut off) and offer a "Send a new link" form, prefilled with the username when known. Opening a used link while signed in as that user goes to the dashboard. - A stale reset form (expired session) returns to the same link instead of a page without the token. - The reset form takes a username or an email. - Reset emails carry Date and Message-ID headers and a plain copy of the link, and say that any of the links works. - Log lines for issued, refused and completed resets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

Downloads: See separate download page
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256: 3c2c7c3e6b178781d650017d89ac86596a175a974c58b35524f27b2142c90cb3
User & Date: arean 2026-12-06 13:15:31.549
Context
2026-12-06
13:15
hub: password reset that survives real inboxes

A user asked for a reset, then clicked the older reset email in the same Gmail thread: that link had expired (60 minutes) and was also deleted by the new request, so the page said only "This link doesn't work".

- Earlier reset links keep working until they expire or one of them is used (newest 5 kept); using one retires the rest. Links last 3 hours. - Dead links say why (expired / already used / cut off) and offer a "Send a new link" form, prefilled with the username when known. Opening a used link while signed in as that user goes to the dashboard. - A stale reset form (expired session) returns to the same link instead of a page without the token. - The reset form takes a username or an email. - Reset emails carry Date and Message-ID headers and a plain copy of the link, and say that any of the links works. - Log lines for issued, refused and completed resets.

Co-Authored-By: Claude Opus 5.5 <[email protected]> leaf check-in: 3c2c7c3e6b user: arean tags: trunk

13:07
hub: move sign-in to /u/login so browsers holding a cached AIForms /login page reach Porjay

Before porjay.labmirai.org had its own nginx vhost, the server's default site (AIForms) answered for it, and its /login page (Last-Modified, no Cache-Control) stays in browsers' HTTP caches for days. Those browsers never ask the hub for /login and their sign-in form posts to AIForms. Every sign-in link and redirect now uses /u/login, a path AIForms never served; /login only forwards there (keeping a same-site next=). CACHE_EPOCH is bumped to 2 so each browser gets Clear-Site-Data: "cache" once more.

Co-Authored-By: Claude Opus 5.5 <[email protected]> check-in: e1a3cbee57 user: arean tags: trunk

Changes
Unified Diff Side-by-Side Diff Patch
Changes to hub/porjay_hub/app.py.
Changes to hub/porjay_hub/config.py.
Changes to hub/porjay_hub/mailer.py.
Changes to hub/porjay_hub/templates/forgot.html.