xsrftoken: avoid token collisions
Adjust token sanitization to avoid collisions.
For example, previously ("u:", "a") and ("u", ":a")
both produced the (pre-hashing) token "u:::a:<timestamp>".
Fixes golang/go#80125
Change-Id: Ia932b762096abaa32bb790999c8e21e56a6a6964
Reviewed-on: https://go-review.googlesource.com/c/net/+/793540
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Nicholas Husin <nsh@golang.org>
Reviewed-by: Nicholas Husin <husin@google.com>
This repository holds supplementary Go networking packages.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/net.
The main issue tracker for the net repository is located at https://go.dev/issues. Prefix your issue with “x/net:” in the subject line, so it is easy to find.