Skip to content

Commit e3aa6c5

Browse files
authored
Merge pull request #3267 from bdarnell/branch6.3
Version 6.3.2
2 parents e0fa53e + 34f5c1c commit e3aa6c5

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

docs/releases.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Release notes
44
.. toctree::
55
:maxdepth: 2
66

7+
releases/v6.3.2
78
releases/v6.3.1
89
releases/v6.3.0
910
releases/v6.2.0

docs/releases/v6.3.2.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
What's new in Tornado 6.3.2
2+
===========================
3+
4+
May 13, 2023
5+
------------
6+
7+
Security improvements
8+
~~~~~~~~~~~~~~~~~~~~~
9+
10+
- Fixed an open redirect vulnerability in StaticFileHandler under certain
11+
configurations.

tornado/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
# is zero for an official release, positive for a development branch,
2323
# or negative for a release candidate or beta (after the base version
2424
# number has been incremented)
25-
version = "6.3.1"
26-
version_info = (6, 3, 1, 0)
25+
version = "6.3.2"
26+
version_info = (6, 3, 2, 0)
2727

2828
import importlib
2929
import typing

tornado/web.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2879,6 +2879,15 @@ def validate_absolute_path(self, root: str, absolute_path: str) -> Optional[str]
28792879
# but there is some prefix to the path that was already
28802880
# trimmed by the routing
28812881
if not self.request.path.endswith("/"):
2882+
if self.request.path.startswith("//"):
2883+
# A redirect with two initial slashes is a "protocol-relative" URL.
2884+
# This means the next path segment is treated as a hostname instead
2885+
# of a part of the path, making this effectively an open redirect.
2886+
# Reject paths starting with two slashes to prevent this.
2887+
# This is only reachable under certain configurations.
2888+
raise HTTPError(
2889+
403, "cannot redirect path with two initial slashes"
2890+
)
28822891
self.redirect(self.request.path + "/", permanent=True)
28832892
return None
28842893
absolute_path = os.path.join(absolute_path, self.default_filename)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy