86a78c6767
gates / gates (push) Successful in 14s
The orphan card told a customer their set-aside off-site history may be restorable later with their recovery code. The discriminator lives on the hub and no wire field carries it, so the box rendering that card cannot evaluate the promise. Copy replaced per the spec: state what happens, decline what we cannot know and say why, name a route. The claim page called the same three-word dashboard code two different names depending on branch, one of which collides with the ten-word escrow code. Retired 'Visszaallito kod'; the name is now constant and the sentence changes. Naming only - a test pins that a reset code is still accepted. secret_in_markup_gate no longer convicts Go template comments, which are stripped before render; still convicts a real rendered secret.
66 lines
4.0 KiB
HTML
66 lines
4.0 KiB
HTML
{{define "claim"}}
|
|
<!DOCTYPE html>
|
|
<html lang="hu">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{if .IsReset}}Jelszó visszaállítása{{else}}A szerver beállítása{{end}} — Felhom</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
</head>
|
|
<body class="login-body">
|
|
<div class="login-card">
|
|
<img src="/static/felhom-logo.svg" alt="Felhom.eu" class="login-logo">
|
|
<h1 class="login-title">{{if .IsReset}}Jelszó <span class="title-accent">visszaállítása</span>{{else}}A szerver <span class="title-accent">beállítása</span>{{end}}</h1>
|
|
<p class="login-subtitle">{{.CustomerName}}</p>
|
|
|
|
{{if .Flash}}<div class="alert alert-info">{{.Flash}}</div>{{end}}
|
|
{{if .Error}}<div class="alert alert-error">{{.Error}}</div>{{end}}
|
|
|
|
{{/* R-295 — ONE NAME PER SECRET. This page used to call the SAME three-word code „Beállító
|
|
kód" on the first-time branch and „Visszaállító kód" on the reset branch, while the
|
|
TEN-word code that opens the sealed backups is called „Helyreállítási kód" elsewhere in
|
|
this UI. Two of those three names are near-homographs, and the collision cost a real code.
|
|
The ruling: the code that gives a person control of the DASHBOARD is „Beállító kód"
|
|
everywhere — the name this page already showed where it is typed — and where one secret
|
|
serves two situations the NAME stays constant and the SENTENCE changes. „Visszaállító
|
|
kód" is retired. This is naming only: no acceptance logic moved, and a test pins that a
|
|
reset code is still accepted here. */}}
|
|
{{if .HasCode}}
|
|
<p style="font-size:0.85rem;color:var(--text-muted,#8a94a6);margin:0 0 1rem">
|
|
{{if .IsReset}}Add meg az e-mailben kapott beállító kódot, majd válassz új jelszót.{{else}}Add meg az e-mailben kapott beállító kódot, majd válassz saját jelszót a vezérlőpult védelméhez.{{end}}
|
|
</p>
|
|
<form method="POST" action="/claim">
|
|
<input type="hidden" name="_csrf" value="{{.ClaimCSRF}}">
|
|
<div class="form-group">
|
|
<label for="code">Beállító kód</label>
|
|
<input type="text" id="code" name="code" required autofocus autocomplete="off"
|
|
placeholder="szó-szó-szó" class="form-control">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="new_password">Új jelszó (min. {{.MinPassword}} karakter)</label>
|
|
<input type="password" id="new_password" name="new_password" required minlength="{{.MinPassword}}"
|
|
placeholder="Legalább {{.MinPassword}} karakter" class="form-control">
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="confirm_password">Új jelszó megerősítése</label>
|
|
<input type="password" id="confirm_password" name="confirm_password" required minlength="{{.MinPassword}}"
|
|
placeholder="Jelszó mégegyszer" class="form-control">
|
|
</div>
|
|
<button type="submit" class="btn btn-primary btn-full">{{if .IsReset}}Jelszó beállítása{{else}}Beállítás és belépés{{end}}</button>
|
|
</form>
|
|
{{else}}
|
|
<div class="alert alert-info">Jelenleg nincs aktív kód ehhez a szerverhez. Kérj egy újat az alábbi gombbal — az e-mailben érkezik a regisztrált címre.</div>
|
|
{{end}}
|
|
|
|
<form method="POST" action="/claim/request-new-code" style="margin-top:1rem">
|
|
<input type="hidden" name="_csrf" value="{{.ClaimCSRF}}">
|
|
<button type="submit" class="btn btn-outline btn-full">{{if .IsReset}}Új beállító kód kérése{{else}}Nem kaptad meg a kódot? Új kód kérése{{end}}</button>
|
|
</form>
|
|
|
|
<p class="login-footer">Felhom — Otthoni szerver kezelés<br>
|
|
<a href="https://felhom.eu" target="_blank">felhom.eu</a></p>
|
|
</div>
|
|
</body>
|
|
</html>
|
|
{{end}}
|