WEB-214Required
Keep personal data out of addresses
Never put names, email addresses or other personal data in URLs. Send them in the body of a POST request instead. Only single-use links from an email may carry a random token.
How to do it
Use method="post" for every form with personal data. Addresses end up in browser history, server logs, analytics and the Referer header sent to other sites. Send Referrer-Policy: strict-origin-when-cross-origin or stricter as a safety net. A token in an email link must be random, expire, work once where it signs in, and never appear in logs. Send Referrer-Policy: no-referrer on that page. See sign-in links.
Examples
HTML example
<!-- Bad: the email lands in logs and history -->
<form action="/subscribe" method="get">
<!-- Good -->
<form action="/subscribe" method="post">
How to check
Submit every form with test data. Search the access log and the browser history for the test values, and find none. Open an email link, and the access log shows the path without its token.
Sources
Related rules
- ACC-69 Make sign-in and reset links single-use and short-lived in Accounts and identity
- API-41 Keep secrets out of addresses in API design
- EML-51 Keep personal data out of links in Email
- APP-31 Keep screen state in the address in Web app interface
- APS-79 Keep private data out of logs and addresses in Application security
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/website/privacy/personal-data-out-of-urls">Agent Wranglers website playbook</a>. In code you write, add a comment next to it with the same link.