]> git.ipfire.org Git - thirdparty/tornado.git/log
thirdparty/tornado.git
8 days agoauth: Formally deprecated OpenIDMixin 3629/head
Ben Darnell [Fri, 29 May 2026 20:04:56 +0000 (16:04 -0400)] 
auth: Formally deprecated OpenIDMixin

8 days agoMerge pull request #3610 from joegasewicz/fix/Improve-and-update-the-tornado-branding
Ben Darnell [Fri, 29 May 2026 19:53:03 +0000 (15:53 -0400)] 
Merge pull request #3610 from joegasewicz/fix/Improve-and-update-the-tornado-branding

Fix improve and update the tornado branding

10 days agoMerge pull request #3627 from bdarnell/relnotes-656
Ben Darnell [Wed, 27 May 2026 16:25:14 +0000 (12:25 -0400)] 
Merge pull request #3627 from bdarnell/relnotes-656

Release notes and version bump for 6.5.6.

10 days agoMerge pull request #3628 from bdarnell/forward-port-656
Ben Darnell [Wed, 27 May 2026 16:22:46 +0000 (12:22 -0400)] 
Merge pull request #3628 from bdarnell/forward-port-656

Forward-port fixes from release 6.5.6 to main branch

10 days agosimple_httpclient: Strip auth headers on cross-origin redirects 3628/head
Ben Darnell [Wed, 27 May 2026 01:30:28 +0000 (21:30 -0400)] 
simple_httpclient: Strip auth headers on cross-origin redirects

When following a redirect to a different origin (scheme, host, or port),
auth-related headers (Authorization and Cookie) should be stripped to
avoid exposing them to the new host.

10 days agospeedups: validate mask length
Ben Darnell [Wed, 27 May 2026 01:17:59 +0000 (21:17 -0400)] 
speedups: validate mask length

The lack of this check permitted a read of up to 3 bytes past the end
of the string in some cases.

10 days agohttp1connection: Enforce max_body_size in _GzipMessageDelegate
Ben Darnell [Tue, 26 May 2026 17:39:53 +0000 (13:39 -0400)] 
http1connection: Enforce max_body_size in _GzipMessageDelegate

This ensures we limit the post-decompression size of the body, and not
only the compressed size (which is enforced via the Content-Length
header at header-processing time).

10 days agoauth: Correctly parse check_authentication response
Ben Darnell [Thu, 21 May 2026 20:02:48 +0000 (16:02 -0400)] 
auth: Correctly parse check_authentication response

This previously used substring search, which is incorrect, although
unlikely to be a vulnerability because there are no free-form text
fields allowed in this response format.

10 days agoRelease notes and version bump for 6.5.6. 3627/head
Ben Darnell [Wed, 27 May 2026 14:36:21 +0000 (10:36 -0400)] 
Release notes and version bump for 6.5.6.

2 weeks agoMerge pull request #3624 from mokashang/fix/test-multi-process-thread-leak
Ben Darnell [Thu, 21 May 2026 18:10:57 +0000 (14:10 -0400)] 
Merge pull request #3624 from mokashang/fix/test-multi-process-thread-leak

Run test_multi_process in a fresh subprocess to avoid leaked-thread fork warning

2 weeks agoMerge pull request #3625 from tornadoweb/dependabot/pip/idna-3.15
Ben Darnell [Wed, 20 May 2026 17:34:23 +0000 (13:34 -0400)] 
Merge pull request #3625 from tornadoweb/dependabot/pip/idna-3.15

build(deps): bump idna from 3.11 to 3.15

2 weeks agobuild(deps): bump idna from 3.11 to 3.15 3625/head
dependabot[bot] [Tue, 19 May 2026 22:54:07 +0000 (22:54 +0000)] 
build(deps): bump idna from 3.11 to 3.15

Bumps [idna](https://github.com/kjd/idna) from 3.11 to 3.15.
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.md)
- [Commits](https://github.com/kjd/idna/compare/v3.11...v3.15)

---
updated-dependencies:
- dependency-name: idna
  dependency-version: '3.15'
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2 weeks agotest/process: run test_multi_process in a clean subprocess 3624/head
mokashang [Tue, 19 May 2026 16:22:52 +0000 (09:22 -0700)] 
test/process: run test_multi_process in a clean subprocess

When `python3 -m tornado.test` is run in an environment where some test
earlier in the suite has left a thread running, the `os.fork()` inside
`fork_processes()` triggers `DeprecationWarning: This process (pid=...)
is multi-threaded, use of fork() may lead to deadlocks in the child` on
Python 3.12+. The test suite turns DeprecationWarnings from tornado
into errors, so `test_multi_process` then fails. This has been observed
in the Fedora rpm build of tornado on Python 3.15.0b1 (#3623), where it
does not reproduce under tox.

Rather than chase down every thread leak across the suite, isolate
`test_multi_process` so it always starts from a single-threaded state.
The actual fork-and-serve logic is moved into a script string that is
executed via `python -c` in a fresh interpreter, following the pattern
established in autoreload_test for tests that need a clean process. The
outer test method just launches the subprocess and asserts a clean
exit. PYTHONPATH is propagated so the source tree under test is
importable. The script keeps the existing `signal.alarm(5)` timers and
`subprocess.run(timeout=30)` is added as a backstop in case the script
hangs in a way the alarms don't catch.

Tested locally on macOS / Python 3.13 with the full suite plus a
deliberately leaked thread before the test to confirm the new isolation
holds. The `tearDown` / `get_app` helpers and the `asyncio`, `logging`,
and HTTP-related top-level imports are no longer needed and are
removed.

Fixes #3623

3 weeks agoMerge pull request #3620 from mokashang/docs/fix-typos-in-comments-and-docs
Ben Darnell [Tue, 12 May 2026 15:07:09 +0000 (11:07 -0400)] 
Merge pull request #3620 from mokashang/docs/fix-typos-in-comments-and-docs

docs: fix typos in comments and documentation

3 weeks agoMerge pull request #3619 from tornadoweb/dependabot/pip/urllib3-2.7.0
Ben Darnell [Tue, 12 May 2026 13:06:05 +0000 (09:06 -0400)] 
Merge pull request #3619 from tornadoweb/dependabot/pip/urllib3-2.7.0

build(deps): bump urllib3 from 2.6.3 to 2.7.0

3 weeks agodocs: fix typos in comments and documentation 3620/head
mokashang [Tue, 12 May 2026 06:49:55 +0000 (23:49 -0700)] 
docs: fix typos in comments and documentation

Corrects nine misspellings found in source code comments, docstrings,
and Sphinx documentation. No runtime behavior is changed.

- docs/guide/intro.rst: implementions -> implementations
- docs/guide/structure.rst: asynchronus -> asynchronous
- tornado/auth.py: verfication -> verification
- tornado/escape.py: Equvalent -> Equivalent; entites -> entities
- tornado/httputil.py: vaildation -> validation
- tornado/platform/asyncio.py: presense -> presence
- tornado/test/httputil_test.py: unamed -> unnamed
- tornado/web.py: presense -> presence

3 weeks agobuild(deps): bump urllib3 from 2.6.3 to 2.7.0 3619/head
dependabot[bot] [Mon, 11 May 2026 16:19:09 +0000 (16:19 +0000)] 
build(deps): bump urllib3 from 2.6.3 to 2.7.0

Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.3 to 2.7.0.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.6.3...2.7.0)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.7.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
4 weeks agoMerge pull request #3617 from takluyver/pycurl-seekfunction
Ben Darnell [Thu, 7 May 2026 19:07:27 +0000 (15:07 -0400)] 
Merge pull request #3617 from takluyver/pycurl-seekfunction

Replace deprecated pycurl IOCTLFUNCTION callback with SEEKFUNCTION

4 weeks agoRemove obsolete curl force_timeout workaround 3617/head
Thomas Kluyver [Wed, 6 May 2026 14:27:56 +0000 (15:27 +0100)] 
Remove obsolete curl force_timeout workaround

4 weeks agoReplace deprecated pycurl IOCTLFUNCTION callback with SEEKFUNCTION
Thomas Kluyver [Wed, 6 May 2026 10:16:36 +0000 (11:16 +0100)] 
Replace deprecated pycurl IOCTLFUNCTION callback with SEEKFUNCTION

7 weeks agoImprove and update the tornado branding and readme header #3609 3610/head
joegasewicz [Sun, 5 Apr 2026 19:22:01 +0000 (20:22 +0100)] 
Improve and update the tornado branding and readme header #3609

2 months agoMerge pull request #3604 from tornadoweb/dependabot/pip/pygments-2.20.0
Ben Darnell [Tue, 31 Mar 2026 00:51:33 +0000 (20:51 -0400)] 
Merge pull request #3604 from tornadoweb/dependabot/pip/pygments-2.20.0

build(deps): bump pygments from 2.19.2 to 2.20.0

2 months agobuild(deps): bump pygments from 2.19.2 to 2.20.0 3604/head
dependabot[bot] [Mon, 30 Mar 2026 20:28:55 +0000 (20:28 +0000)] 
build(deps): bump pygments from 2.19.2 to 2.20.0

Bumps [pygments](https://github.com/pygments/pygments) from 2.19.2 to 2.20.0.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](https://github.com/pygments/pygments/compare/2.19.2...2.20.0)

---
updated-dependencies:
- dependency-name: pygments
  dependency-version: 2.20.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2 months agoMerge pull request #3603 from tornadoweb/dependabot/pip/requests-2.33.0
Ben Darnell [Thu, 26 Mar 2026 17:59:30 +0000 (13:59 -0400)] 
Merge pull request #3603 from tornadoweb/dependabot/pip/requests-2.33.0

build(deps): bump requests from 2.32.5 to 2.33.0

2 months agobuild(deps): bump requests from 2.32.5 to 2.33.0 3603/head
dependabot[bot] [Thu, 26 Mar 2026 16:36:21 +0000 (16:36 +0000)] 
build(deps): bump requests from 2.32.5 to 2.33.0

Bumps [requests](https://github.com/psf/requests) from 2.32.5 to 2.33.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.32.5...v2.33.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-version: 2.33.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2 months agoMerge pull request #3602 from bdarnell/master
Ben Darnell [Mon, 23 Mar 2026 17:29:51 +0000 (13:29 -0400)] 
Merge pull request #3602 from bdarnell/master

Update all deps in requirements.txt

2 months agoUpdate all deps in requirements.txt 3602/head
Ben Darnell [Mon, 23 Mar 2026 17:00:14 +0000 (13:00 -0400)] 
Update all deps in requirements.txt

Most notably includes a new mypy which required a few small
changes.

Closes #3580

2 months agoMerge pull request #3601 from bdarnell/actions-update
Ben Darnell [Mon, 23 Mar 2026 16:59:41 +0000 (12:59 -0400)] 
Merge pull request #3601 from bdarnell/actions-update

ci: Update versions of github actions

2 months agoci: Update versions of github actions 3601/head
Ben Darnell [Fri, 20 Mar 2026 15:18:03 +0000 (11:18 -0400)] 
ci: Update versions of github actions

These actions are generating deprecation warnings due to an old node.js
version, and for some reason github marks this upgrade as a major
version change even when there is no behavior change.

2 months agoMerge pull request #3600 from bdarnell/more-archs
Ben Darnell [Fri, 20 Mar 2026 11:40:59 +0000 (07:40 -0400)] 
Merge pull request #3600 from bdarnell/more-archs

ci: Build wheels for more architectures under emulation

2 months agoci: Build wheels for more architectures under emulation 3600/head
Ben Darnell [Fri, 20 Mar 2026 01:36:17 +0000 (21:36 -0400)] 
ci: Build wheels for more architectures under emulation

This commit also fixes the macos build to use universal2 wheels,
which was broken with the addition of riscv64 support.

Support for these architectures is experimental, but we have had
a request for ppc64le in #3449. As long as emulation gives us a turnkey
solution, we might as well build for them, but if the emulation
pipeline turns out to be unstable we will reconsider. (armv7l is also
experimentally supported by cibuildwheel and even shows up more
frequently in our download stats than ppc64le and s390x, but I got
a cryptic failure when I tried it so I'm leaving it out for now.)

This commit reduces the amount of testing we do for emulated
builds because they are otherwise the slowest part of the build
pipeline.

2 months agoMerge pull request #3599 from bdarnell/isort
Ben Darnell [Fri, 20 Mar 2026 03:11:27 +0000 (23:11 -0400)] 
Merge pull request #3599 from bdarnell/isort

*: Rewrite imports with isort

2 months ago*: Rewrite imports with isort 3599/head
Ben Darnell [Fri, 20 Mar 2026 03:05:22 +0000 (23:05 -0400)] 
*: Rewrite imports with isort

Today's type import changes have caused a lot of churn in the import
statements and we've never had a consistent style. Run a one-time
cleanup with isort to tidy things up. I'm not (currently) planning
to make this a CI-enforced rule.

2 months agoMerge pull request #3598 from bdarnell/ci-3.15
Ben Darnell [Fri, 20 Mar 2026 02:56:46 +0000 (22:56 -0400)] 
Merge pull request #3598 from bdarnell/ci-3.15

ci: Test under python 3.15 dev builds

2 months agoci: Test under python 3.15 dev builds 3598/head
Ben Darnell [Fri, 20 Mar 2026 01:55:56 +0000 (21:55 -0400)] 
ci: Test under python 3.15 dev builds

Clean up after ThreadedResolver tests to avoid failures related to
calling os.fork in a multithreaded process.

2 months agoMerge pull request #3546 from justeph/justeph/ci-add-riscv64
Ben Darnell [Fri, 20 Mar 2026 01:31:03 +0000 (21:31 -0400)] 
Merge pull request #3546 from justeph/justeph/ci-add-riscv64

ci: add riscv64 manylinux/musllinux wheels

2 months agoci: add riscv64 manylinux/musllinux wheels 3546/head
Julien Stephan [Wed, 26 Nov 2025 17:09:48 +0000 (18:09 +0100)] 
ci: add riscv64 manylinux/musllinux wheels

Now that cibuildwheel and PyPI support riscv64, we can start building
riscv64 wheels for Tornado.

Because there is no native riscv64 runner available, this PR adds a
QEMU-based riscv64 job to the cibuildwheel workflow.

Due to emulation, we need to:
- Increase ASYNC_TEST_TIMEOUT to 30s to accommodate slower runs
- Increase timeout for test_request_timeout
- Skip test_unquote_large

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
2 months agoMerge pull request #3597 from bdarnell/unconditional-typing
Ben Darnell [Thu, 19 Mar 2026 23:11:04 +0000 (19:11 -0400)] 
Merge pull request #3597 from bdarnell/unconditional-typing

Remove obsolete conditional imports (mostly typing-related)

2 months agogen,test: Remove conditional imports of modules that are now standard 3597/head
Ben Darnell [Thu, 19 Mar 2026 19:50:32 +0000 (15:50 -0400)] 
gen,test: Remove conditional imports of modules that are now standard

2 months ago*: Remove obsolete noqa comments
Ben Darnell [Thu, 19 Mar 2026 19:10:22 +0000 (15:10 -0400)] 
*: Remove obsolete noqa comments

Mostly thanks to pyflakes improving compatibility with type
annotations and overloads.

2 months ago*: Remove most typing.TYPE_CHECKING guards and F401 noqa comments
Ben Darnell [Thu, 19 Mar 2026 19:03:46 +0000 (15:03 -0400)] 
*: Remove most typing.TYPE_CHECKING guards and F401 noqa comments

Flake8 now understands type annotations and no longer emits
"unused import" warnings for type imports. Most imports that
were previously behind TYPE_CHECKING guards are no longer
needed, or can be moved to unguarded imports.

2 months agoMerge pull request #3596 from bdarnell/pyupgrade
Ben Darnell [Thu, 19 Mar 2026 16:14:34 +0000 (12:14 -0400)] 
Merge pull request #3596 from bdarnell/pyupgrade

Use pyupgrade to adopt python 3.9 and 3.10 features

2 months ago*: Import Callable from collections.abc instead of typing (py310+) 3596/head
Ben Darnell [Thu, 19 Mar 2026 15:36:02 +0000 (11:36 -0400)] 
*: Import Callable from collections.abc instead of typing (py310+)

Automated change by pyupgrade ("imports" plugin)

2 months ago*: Update type annotations to use python 3.10 features
Ben Darnell [Thu, 19 Mar 2026 15:28:25 +0000 (11:28 -0400)] 
*: Update type annotations to use python 3.10 features

Automated change by pyupgrade (typing plugins) followed by manual
fixes of unused imports

2 months ago*: Rewrite typing imports to use their new (3.9+) locations
Ben Darnell [Thu, 19 Mar 2026 15:24:02 +0000 (11:24 -0400)] 
*: Rewrite typing imports to use their new (3.9+) locations

Automated change by pyupgrade ("imports" plugin)

2 months ago*: Update type annotations to use Python 3.9 features
Ben Darnell [Thu, 19 Mar 2026 14:22:16 +0000 (10:22 -0400)] 
*: Update type annotations to use Python 3.9 features

Automated change with pyupgrade (restricted to the typing plugins)
followed by manual removal of unused imports.

2 months ago*: Remaining pyupgrade 3.8 fixes
Ben Darnell [Thu, 19 Mar 2026 14:15:13 +0000 (10:15 -0400)] 
*: Remaining pyupgrade 3.8 fixes

2 months ago*: Update type annotations with py3.8 features
Ben Darnell [Thu, 19 Mar 2026 14:06:12 +0000 (10:06 -0400)] 
*: Update type annotations with py3.8 features

Automated change with pyupgrade (restricted to the typing plugins),
followed by manual removal of unused imports.

2 months agoMerge pull request #3595 from hauntsaninja/typcom
Ben Darnell [Thu, 19 Mar 2026 13:51:42 +0000 (09:51 -0400)] 
Merge pull request #3595 from hauntsaninja/typcom

Modernise all type comments

2 months agoModernise all type comments 3595/head
hauntsaninja [Wed, 18 Mar 2026 23:57:38 +0000 (16:57 -0700)] 
Modernise all type comments

2 months agoUse variable annotations to avoid None defaults (#3575)
Shantanu [Wed, 18 Mar 2026 19:36:28 +0000 (12:36 -0700)] 
Use variable annotations to avoid None defaults (#3575)

PEP 526 landed in Python 3.5 which is quite dead now

2 months agoMerge pull request #3593 from bdarnell/contributing
Ben Darnell [Tue, 17 Mar 2026 19:24:12 +0000 (15:24 -0400)] 
Merge pull request #3593 from bdarnell/contributing

doc: Add CONTRIBUTING.md

2 months agodoc: Add CONTRIBUTING.md 3593/head
Ben Darnell [Tue, 17 Mar 2026 18:13:32 +0000 (14:13 -0400)] 
doc: Add CONTRIBUTING.md

Closes #2675
Closes #2668

2 months agoMerge pull request #3592 from bdarnell/update-black
Ben Darnell [Mon, 16 Mar 2026 19:36:00 +0000 (15:36 -0400)] 
Merge pull request #3592 from bdarnell/update-black

build(deps): bump black from 25.1.0 to 26.3.1

2 months agoMerge pull request #3591 from bdarnell/incomplete-comment
Ben Darnell [Mon, 16 Mar 2026 19:31:38 +0000 (15:31 -0400)] 
Merge pull request #3591 from bdarnell/incomplete-comment

web: Fix an incomplete comment that was omitted from 459e1c3d3b

2 months agobuild(deps): bump black from 25.1.0 to 26.3.1 3592/head
Ben Darnell [Mon, 16 Mar 2026 19:30:11 +0000 (15:30 -0400)] 
build(deps): bump black from 25.1.0 to 26.3.1

This fixes a security issue in black. Original dependabot PR
is #3590, but we had to do it manually to apply the new formatting
changes and pass lint.

Closes #3590

2 months agoweb: Fix an incomplete comment that was omitted from 459e1c3d3b 3591/head
Ben Darnell [Mon, 16 Mar 2026 19:21:50 +0000 (15:21 -0400)] 
web: Fix an incomplete comment that was omitted from 459e1c3d3b

2 months agoMerge pull request #3582 from charles2910/fix-tests-with-curl-8-19-0
Ben Darnell [Thu, 12 Mar 2026 18:50:25 +0000 (14:50 -0400)] 
Merge pull request #3582 from charles2910/fix-tests-with-curl-8-19-0

Make tests compatible with curl 8.19.0

2 months agoMake tests compatible with curl 8.19.0 3582/head
Carlos Henrique Lima Melara [Fri, 6 Mar 2026 03:56:17 +0000 (00:56 -0300)] 
Make tests compatible with curl 8.19.0

In 8.19.0-rc2, the error logic has been changed so any later errors are
preserved. This changes what is returned by curl and therefore what tornado
sees. For HTTPError variant of the test, which uses CurlAsyncHTTPClient, we get
the error from pycurl and now it contains "Failed binding local connection
end". This logic handles both the old version of libcurl and also the newer
one.

Co-Authored-By: Samuel Henrique <samueloph@debian.org>
2 months agoMerge pull request #3589 from bdarnell/update-cibw2
Ben Darnell [Wed, 11 Mar 2026 01:59:15 +0000 (21:59 -0400)] 
Merge pull request #3589 from bdarnell/update-cibw2

build: Update cibuildwheel to v3.4.0

2 months agobuild: Update cibuildwheel to v3.4.0 3589/head
Ben Darnell [Wed, 11 Mar 2026 01:12:26 +0000 (21:12 -0400)] 
build: Update cibuildwheel to v3.4.0

This matches the version used in branch6.5

2 months agoMerge pull request #3588 from bdarnell/relnotes-65
Ben Darnell [Wed, 11 Mar 2026 01:05:43 +0000 (21:05 -0400)] 
Merge pull request #3588 from bdarnell/relnotes-65

Copy release notes from branch6.5 to master

2 months agodocs: Use correct link syntax, not markdown. 3588/head
Ben Darnell [Wed, 11 Mar 2026 00:48:55 +0000 (20:48 -0400)] 
docs: Use correct link syntax, not markdown.

2 months agoRelease notes and version bump for v6.5.5
Ben Darnell [Tue, 10 Mar 2026 17:00:44 +0000 (13:00 -0400)] 
Release notes and version bump for v6.5.5

2 months agoRelease notes and version bump for 6.5.4
Ben Darnell [Mon, 15 Dec 2025 18:36:01 +0000 (13:36 -0500)] 
Release notes and version bump for 6.5.4

2 months agoMerge pull request #3584 from bdarnell/security-655
Ben Darnell [Tue, 10 Mar 2026 16:39:03 +0000 (12:39 -0400)] 
Merge pull request #3584 from bdarnell/security-655

Security fixes for release 6.5.5

2 months agohttputil: Add CRLF to _FORBIDDEN_HEADER_CHARS_RE 3584/head
Ben Darnell [Tue, 10 Mar 2026 16:19:50 +0000 (12:19 -0400)] 
httputil: Add CRLF to _FORBIDDEN_HEADER_CHARS_RE

I think these were omitted due to quirks of an older version of the
parsing code. Linefeeds are already effectively prohibited within
header values since they are interpreted as delimiters, so the net
effect of this change is to prohibit bare carriage returns within
header values. This RE is used only when parsing headers inside
multipart/form-data bodies; for HTTP headers CR was already prohibited.

3 months agoweb: Validate characters in all cookie attributes.
Ben Darnell [Fri, 6 Mar 2026 19:50:25 +0000 (14:50 -0500)] 
web: Validate characters in all cookie attributes.

Our previous control character check was missing a check for
U+007F, and also semicolons, which are only allowed in quoted
parts of values. This commit checks all attributes and
updates the set of disallowed characters.

3 months agohttputil: Add limits on multipart form data parsing
Ben Darnell [Tue, 3 Mar 2026 19:36:14 +0000 (14:36 -0500)] 
httputil: Add limits on multipart form data parsing

The new default limits prevent a DoS vulnerability involving
requests with many multipart parts. It also adds a defense-in-depth
limit on the size of multipart headers, which would have mitigated
the vulnerability fixed in 6.5.3.

New data structures are added to allow users to configure these limits,
and to disable multipart parsing entirely if they choose. However,
due to the complexity of the plumbing required to pass these
configuration options through the stack, the only configuration
provided in this commit is the ability to set a global default.

4 months agoMerge pull request #3573 from tornadoweb/dependabot/pip/wheel-0.46.2
Ben Darnell [Fri, 23 Jan 2026 01:16:18 +0000 (20:16 -0500)] 
Merge pull request #3573 from tornadoweb/dependabot/pip/wheel-0.46.2

build(deps): bump wheel from 0.45.1 to 0.46.2

4 months agobuild(deps): bump wheel from 0.45.1 to 0.46.2 3573/head
dependabot[bot] [Thu, 22 Jan 2026 19:16:25 +0000 (19:16 +0000)] 
build(deps): bump wheel from 0.45.1 to 0.46.2

Bumps [wheel](https://github.com/pypa/wheel) from 0.45.1 to 0.46.2.
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.45.1...0.46.2)

---
updated-dependencies:
- dependency-name: wheel
  dependency-version: 0.46.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agoMerge pull request #3572 from takluyver/compat-cleanup
Ben Darnell [Tue, 20 Jan 2026 14:26:57 +0000 (09:26 -0500)] 
Merge pull request #3572 from takluyver/compat-cleanup

Clean up some compatibility for older Python versions

4 months agoClean up some compatibility for older Python versions 3572/head
Thomas Kluyver [Sat, 17 Jan 2026 18:44:06 +0000 (18:44 +0000)] 
Clean up some compatibility for older Python versions

4 months agoMerge pull request #3570 from tornadoweb/dependabot/pip/filelock-3.20.3
Ben Darnell [Tue, 13 Jan 2026 20:41:56 +0000 (15:41 -0500)] 
Merge pull request #3570 from tornadoweb/dependabot/pip/filelock-3.20.3

build(deps): bump filelock from 3.20.1 to 3.20.3

4 months agobuild(deps): bump filelock from 3.20.1 to 3.20.3 3570/head
dependabot[bot] [Tue, 13 Jan 2026 20:28:22 +0000 (20:28 +0000)] 
build(deps): bump filelock from 3.20.1 to 3.20.3

Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.20.1 to 3.20.3.
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/py-filelock/compare/3.20.1...3.20.3)

---
updated-dependencies:
- dependency-name: filelock
  dependency-version: 3.20.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agoMerge pull request #3569 from tornadoweb/dependabot/pip/virtualenv-20.36.1
Ben Darnell [Tue, 13 Jan 2026 20:26:43 +0000 (15:26 -0500)] 
Merge pull request #3569 from tornadoweb/dependabot/pip/virtualenv-20.36.1

build(deps): bump virtualenv from 20.31.2 to 20.36.1

4 months agobuild(deps): bump virtualenv from 20.31.2 to 20.36.1 3569/head
dependabot[bot] [Tue, 13 Jan 2026 20:00:18 +0000 (20:00 +0000)] 
build(deps): bump virtualenv from 20.31.2 to 20.36.1

Bumps [virtualenv](https://github.com/pypa/virtualenv) from 20.31.2 to 20.36.1.
- [Release notes](https://github.com/pypa/virtualenv/releases)
- [Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst)
- [Commits](https://github.com/pypa/virtualenv/compare/20.31.2...20.36.1)

---
updated-dependencies:
- dependency-name: virtualenv
  dependency-version: 20.36.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agoMerge pull request #3568 from tornadoweb/dependabot/pip/urllib3-2.6.3
Ben Darnell [Mon, 12 Jan 2026 18:40:19 +0000 (13:40 -0500)] 
Merge pull request #3568 from tornadoweb/dependabot/pip/urllib3-2.6.3

build(deps): bump urllib3 from 2.6.0 to 2.6.3

4 months agobuild(deps): bump urllib3 from 2.6.0 to 2.6.3 3568/head
dependabot[bot] [Thu, 8 Jan 2026 06:35:07 +0000 (06:35 +0000)] 
build(deps): bump urllib3 from 2.6.0 to 2.6.3

Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.0 to 2.6.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.6.0...2.6.3)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.6.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
5 months agoMerge pull request #3566 from tornadoweb/dependabot/pip/filelock-3.20.1
Ben Darnell [Wed, 17 Dec 2025 18:38:43 +0000 (13:38 -0500)] 
Merge pull request #3566 from tornadoweb/dependabot/pip/filelock-3.20.1

build(deps): bump filelock from 3.18.0 to 3.20.1

5 months agobuild(deps): bump filelock from 3.18.0 to 3.20.1 3566/head
dependabot[bot] [Tue, 16 Dec 2025 22:45:34 +0000 (22:45 +0000)] 
build(deps): bump filelock from 3.18.0 to 3.20.1

Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.18.0 to 3.20.1.
- [Release notes](https://github.com/tox-dev/py-filelock/releases)
- [Changelog](https://github.com/tox-dev/filelock/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/py-filelock/compare/3.18.0...3.20.1)

---
updated-dependencies:
- dependency-name: filelock
  dependency-version: 3.20.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
5 months agoMerge pull request #3563 from arnaudsjs/issue/fix-case-insensitivity-in-operator
Ben Darnell [Mon, 15 Dec 2025 18:28:18 +0000 (13:28 -0500)] 
Merge pull request #3563 from arnaudsjs/issue/fix-case-insensitivity-in-operator

Make sure that the in-operator on HTTPHeaders is case insensitive

5 months agoMake sure that the in-operator on HTTPHeaders is case insensitive 3563/head
Arnaud Schoonjans [Mon, 15 Dec 2025 11:12:18 +0000 (12:12 +0100)] 
Make sure that the in-operator on HTTPHeaders is case insensitive

5 months agoMerge pull request #3559 from bdarnell/relnotes-653-master
Ben Darnell [Thu, 11 Dec 2025 14:59:09 +0000 (09:59 -0500)] 
Merge pull request #3559 from bdarnell/relnotes-653-master

Release notes for 6.5.3

5 months agoRelease notes for 6.5.3 3559/head
Ben Darnell [Thu, 11 Dec 2025 02:58:28 +0000 (21:58 -0500)] 
Release notes for 6.5.3

5 months agoMerge pull request #3556 from bdarnell/perf-counter
Ben Darnell [Thu, 11 Dec 2025 03:16:17 +0000 (22:16 -0500)] 
Merge pull request #3556 from bdarnell/perf-counter

test: Use time.perf_counter instead of time.time for performance tests

5 months agotox: Pin pycares version 4 due to backwards-incompatible changes 3556/head
Ben Darnell [Thu, 11 Dec 2025 03:10:20 +0000 (22:10 -0500)] 
tox: Pin pycares version 4 due to backwards-incompatible changes

5 months agotest: Use time.perf_counter instead of time.time for performance tests
Ben Darnell [Thu, 11 Dec 2025 03:00:03 +0000 (22:00 -0500)] 
test: Use time.perf_counter instead of time.time for performance tests

On windows, time.time has low resolution (about 15ms), which makes
performance tests flaky. time.perf_counter has much higher resolution
and is the recommended way to measure elapsed time.

5 months agoMerge pull request #3554 from bdarnell/parseparam
Ben Darnell [Wed, 10 Dec 2025 20:55:02 +0000 (15:55 -0500)] 
Merge pull request #3554 from bdarnell/parseparam

httputil: Fix quadratic behavior in _parseparam

5 months agoMerge pull request #3553 from bdarnell/header-concat
Ben Darnell [Wed, 10 Dec 2025 20:54:49 +0000 (15:54 -0500)] 
Merge pull request #3553 from bdarnell/header-concat

httputil: Fix quadratic performance of repeated header lines

5 months agoMerge pull request #3552 from bdarnell/http-reason
Ben Darnell [Wed, 10 Dec 2025 20:54:32 +0000 (15:54 -0500)] 
Merge pull request #3552 from bdarnell/http-reason

web: Harden against invalid HTTP reason phrases

5 months agoweb: Harden against invalid HTTP reason phrases 3552/head
Ben Darnell [Wed, 10 Dec 2025 20:15:25 +0000 (15:15 -0500)] 
web: Harden against invalid HTTP reason phrases

We allow applications to set custom reason phrases for the HTTP status
line (to support custom status codes), but if this were exposed to
untrusted data it could be exploited in various ways. This commit
guards against invalid reason phrases in both HTTP headers and in
error pages.

5 months agohttputil: Fix quadratic behavior in _parseparam 3554/head
Ben Darnell [Wed, 10 Dec 2025 15:55:02 +0000 (10:55 -0500)] 
httputil: Fix quadratic behavior in _parseparam

Prior to this change, _parseparam had O(n^2) behavior when parsing
certain inputs, which could be a DoS vector. This change adapts
logic from the equivalent function in the python standard library
in https://github.com/python/cpython/pull/136072/files

5 months agohttputil: Fix quadratic performance of repeated header lines 3553/head
Ben Darnell [Tue, 9 Dec 2025 18:27:27 +0000 (13:27 -0500)] 
httputil: Fix quadratic performance of repeated header lines

Previouisly, when many header lines with the same name were found
in an HTTP request or response, repeated string concatenation would
result in quadratic performance. This change does the concatenation
lazily (with a cache) so that repeated headers can be processed
efficiently.

Security: The previous behavior allowed a denial of service attack
via a maliciously crafted HTTP message, but only if the
max_header_size was increased from its default of 64kB.

5 months agoprocess_test: Use isolated mode for subprocess tests
Ben Darnell [Tue, 9 Dec 2025 17:10:18 +0000 (12:10 -0500)] 
process_test: Use isolated mode for subprocess tests

Prompt customizations (notably the PYTHONSTARTUP file used by
vscode's terminal integration) can interfere with tests that run
interactive interpreters in a subprocess. Run those interpreters
in isolated mode to avoid this problem.)

5 months agoMerge pull request #3551 from bdarnell/demo-cleanup
Ben Darnell [Tue, 9 Dec 2025 15:51:18 +0000 (10:51 -0500)] 
Merge pull request #3551 from bdarnell/demo-cleanup

demos: Fix open redirects, remove s3server.py

5 months agodemos: Fix open redirects 3551/head
Ben Darnell [Tue, 9 Dec 2025 15:40:18 +0000 (10:40 -0500)] 
demos: Fix open redirects

Several demos had handlers that redirected to a "next" URL
provided as a query parameter without validating it first.

5 months agodemos: Remove s3server demo
Ben Darnell [Tue, 9 Dec 2025 15:19:34 +0000 (10:19 -0500)] 
demos: Remove s3server demo

This program does not demonstrate anything particularly interesting
about Tornado, nor is it a good stylistic example to follow. Its
handling of path validation is rudimentary and can be insecure in
some configurations. It makes more sense to remove it than to
try and improve it.

5 months agodemos: Remove obsolete note in demos/README.rst
Ben Darnell [Tue, 9 Dec 2025 15:18:36 +0000 (10:18 -0500)] 
demos: Remove obsolete note in demos/README.rst

This note referred to Tornado 6.3, which has been released.

5 months agoMerge pull request #3550 from tornadoweb/dependabot/pip/urllib3-2.6.0
Ben Darnell [Mon, 8 Dec 2025 16:30:18 +0000 (11:30 -0500)] 
Merge pull request #3550 from tornadoweb/dependabot/pip/urllib3-2.6.0

build(deps): bump urllib3 from 2.5.0 to 2.6.0