Files
sweet/tests
Marvin Hagemeister aeca15eeb9 fix: open redirect issue with trailing slash detection (#2313)
Passing a path like `/foo/bar` as the location header is interpreted as
a relative path. But when it contains two leading slashes like
`//evil.com/` it is interpreted as a port relative url. This has the
consequence that the origin of a URL can essentially be replaced:

```ts
new URL("//evil.com", "https://example.com/");
// -> 'https://evil.com/'
```

Our trailing slash detection logic didn't guard against this case. By
normalizing the pathname of the URL and stripping sibling forward
slashes we sidestep this problem.
2024-02-14 15:25:16 +01:00
..
2023-11-03 16:52:54 +01:00
2023-11-03 16:52:54 +01:00