mirror of
https://github.com/sol1/rustguac.git
synced 2026-10-27 05:57:06 +00:00
6dfee70964
The login `next` check allowed anything starting with a single `/`. Browsers treat `\` as `/` and drop tabs and newlines in Location, so `/\evil.com`, and `/%09/evil.com` once the query was decoded, both redirected to another site straight after a successful login on the real login page. `next` must now be visible ASCII with no backslash, and must not start with an encoded slash or backslash. That also keeps it safe to place in the rustguac_next cookie unescaped, where a `;` could previously add cookie attributes. Checked both when the cookie is set and when it is consumed.