1
1
mirror of https://github.com/go-gitea/gitea synced 2025-01-22 07:34:26 +00:00
zeripath 0b1686b67a
Prevent redirect to Host (2) (#19175)
Unhelpfully Locations starting with `/\` will be converted by the
browser to `//` because ... well I do not fully understand. Certainly
the RFCs and MDN do not indicate that this would be expected. Providing
"compatibility" with the (mis)behaviour of a certain proprietary OS is
my suspicion. However, we clearly have to protect against this.

Therefore we should reject redirection locations that match the regular
expression: `^/[\\\\/]+`

Reference #9678

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-03-23 16:12:36 +00:00
..
2022-01-20 18:46:10 +01:00
2022-03-22 15:03:22 +08:00
2022-01-20 18:46:10 +01:00
2022-01-20 18:46:10 +01:00
2022-03-22 15:03:22 +08:00
2022-01-20 18:46:10 +01:00
2022-01-20 18:46:10 +01:00
2021-01-26 16:36:53 +01:00
2021-01-26 16:36:53 +01:00