Documentation
¶
Overview ¶
Package redirect holds checks shared by the return_to validators.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PathIsPlain ¶
PathIsPlain reports whether u's path is the path a browser will request: it has no "." or ".." segments, written plainly or percent-encoded, and does not decode to one starting with "//".
A validator that checks the raw string and then hands it on is not enough on its own: "/.//evil.example" starts with a single slash, but a client that resolves it and rebuilds the URL from its path gets "//evil.example", which a browser reads as another host.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.