feat: e-mail, password reset and shareable links for images and collections
Mail goes out through the account's own mailbox (SMTP) rather than a sending service: the domain lives there anyway, so SPF and DKIM line up by themselves and no third party gets to see the messages. Credentials are AES-256-GCM encrypted in settings like every other secret, never in the repo. nodemailer has zero dependencies and no native postinstall -- checked before adding it, given the history. Password reset: single-use token, only its hash is stored, one hour, and the request endpoint answers identically whether or not the address exists so it cannot be used to enumerate accounts. Rate limited per address. Share links (/s/<slug>) let someone without an account see the pictures and download them at full resolution. These are photos of children, so the defaults lean safe: every link expires by itself (30 days), can be revoked, optionally carries a passphrase, and the page and files are noindex. Access is bound to the link, not the image -- swapping in another item id on a valid link returns 404. Private-session results can never be shared at all. Tracking records when and with what, never who: IP addresses are only stored salted-and-hashed, so repeat visitors can be counted but nobody identified. Sharing goes out by mail (several recipients at once, no attachment -- a link can be withdrawn later, an attachment cannot) or via wa.me, which opens WhatsApp with the text prepared. The WhatsApp Business API would need a Meta account, approved templates and per-conversation fees; this works today for free and the API can slot in behind it later. Verified end to end against a local SMTP server: reset issues and consumes its token exactly once, the old password stops working, an unknown address gives the same answer, share mail reaches several recipients. Link behaviour checked for expiry (410), revocation (410), wrong passphrase (401) and download lock (403). Outbound SMTP is blocked in the sandbox, so the real mailbox still needs one test from the live server. Also fixes a regression this introduced: the seventh nav item pushed the logout button off screen at 820px. The bar now shrinks and scrolls, logout never does. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BNhLunz586g6DeYMa7Qsd1
This commit is contained in:
27 files changed
+1946
-13
No files matched your search
@@ -174,6 +174,30 @@ import Base from '../layouts/Base.astro';
|
||||
aufs NAS sichern.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Mein Konto, Teilen & E-Mail</h2>
|
||||
<ul>
|
||||
<li><b><a href="/konto">Mein Konto</a></b>: E-Mail-Adresse hinterlegen — damit kannst du dir
|
||||
ein neues Passwort schicken lassen, wenn du deines vergisst. Dort lässt sich auch einschalten,
|
||||
dass du eine kurze Mail bekommst, sobald ein Auftrag fertig ist.</li>
|
||||
<li><b>Teilen</b>: In der Bibliothek auf <b>Teilen</b> tippen — einzeln oder für mehrere markierte
|
||||
Bilder auf einmal. Es entsteht ein Link, den auch jemand <b>ohne Klarbild-Konto</b> öffnen kann;
|
||||
von dort lässt sich das Bild in voller Auflösung herunterladen.</li>
|
||||
<li><b>Weitergeben</b> per <b>WhatsApp</b> (öffnet WhatsApp mit fertigem Text), über dein eigenes
|
||||
Mailprogramm, oder direkt aus Klarbild heraus per E-Mail an mehrere Empfänger.</li>
|
||||
<li><b>Sicher bleiben</b>: Jeder Link läuft von selbst ab (Standard 30 Tage), lässt sich jederzeit
|
||||
<b>abschalten</b> und auf Wunsch mit einem <b>Zugangswort</b> schützen. Das Wort schickst du dann
|
||||
getrennt vom Link — sonst nützt es nichts.</li>
|
||||
<li><b><a href="/teilen">Geteilte Links</a></b>: Übersicht über alles, was gerade offen ist —
|
||||
mit Aufrufen und Downloads. Festgehalten wird <b>wann</b> und <b>womit</b> geöffnet wurde,
|
||||
nicht <b>wer</b>: Die IP-Adresse liegt nur gehasht vor und lässt sich nicht zurückrechnen.</li>
|
||||
<li><b>Passwort vergessen?</b> Auf der Anmeldeseite unten auf „Passwort vergessen?" — der Link
|
||||
aus der Mail gilt eine Stunde und lässt sich nur einmal verwenden.</li>
|
||||
</ul>
|
||||
<p class="mini">Bilder aus einer <b>privaten Sitzung</b> lassen sich bewusst nicht teilen und lösen
|
||||
auch keine Benachrichtigung aus.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Tipps</h2>
|
||||
<ul>
|
||||
|
||||
Reference in new issue
Block a user