mirror of https://github.com/vee1e/mitmproxy - An interactive TLS-capable intercepting HTTP proxy for penet
Find a file
Julio César Suástegui a8fbfc73fa
fix: avoid IndexError in is_mostly_bin for short tails (#8196)
* fix: avoid IndexError in is_mostly_bin for short tails

`is_mostly_bin` looks up to 4 bytes past the 100-byte cutoff to find a
clean UTF-8 character boundary. when the input is just over 100 bytes
and starts with a continuation byte at index 100, the lookahead reads
past the end of the buffer.

cap the loop end at `len(s)`. existing fallback to `s[:100]` still
covers the case where every byte in the lookahead window is a
continuation byte.

fixes #8188

* [autofix.ci] apply automated fixes

---------

Co-authored-by: Julio César Suástegui <juliosuas@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-04-25 11:24:59 +02:00
.github Remove cooldown from pyOpenSSL and our own packages 2026-04-13 19:36:34 +02:00
docs Use sys.executable instead of python3 in docs build script (#8183) 2026-04-19 14:50:02 +02:00
examples docs: fix typos in some files (#7981) 2025-11-18 09:56:35 +01:00
mitmproxy fix: avoid IndexError in is_mostly_bin for short tails (#8196) 2026-04-25 11:24:59 +02:00
release release ci: do not eat npm output 2025-11-24 19:06:11 +01:00
test fix: avoid IndexError in is_mostly_bin for short tails (#8196) 2026-04-25 11:24:59 +02:00
web web: Reduce FlowTable Redux subscriptions from O(rows) to O(1) (#8104) 2026-04-10 14:39:20 +00:00
.gitattributes
.gitignore switch to uv (#7662) 2025-04-16 18:38:35 +02:00
.python-version Update to Python 3.14 (#7918) 2025-10-15 21:32:53 +02:00
AGENTS.md Add AGENTS.md (#7907) 2025-10-09 20:20:57 +02:00
CHANGELOG.md fix: avoid IndexError in is_mostly_bin for short tails (#8196) 2026-04-25 11:24:59 +02:00
codecov.yml
CONTRIBUTING.md switch to uv (#7662) 2025-04-16 18:38:35 +02:00
LICENSE
MANIFEST.in
pyproject.toml Update asgiref requirement from <=3.11.0,>=3.2.10 to >=3.2.10,<=3.11.1 (#8181) 2026-04-13 19:58:51 +02:00
README.md remove codacy badge 2026-04-12 23:27:13 +02:00
SECURITY.md SECURITY.md: Exclude DoS from scope (#8171) 2026-04-12 22:36:48 +02:00
uv.lock Update asgiref requirement from <=3.11.0,>=3.2.10 to >=3.2.10,<=3.11.1 (#8181) 2026-04-13 19:58:51 +02:00

mitmproxy

Continuous Integration Status autofix.ci: enabled Coverage Status Latest Version Supported Python versions

mitmproxy is an interactive, SSL/TLS-capable intercepting proxy with a console interface for HTTP/1, HTTP/2, and WebSockets.

mitmdump is the command-line version of mitmproxy. Think tcpdump for HTTP.

mitmweb is a web-based interface for mitmproxy.

Installation

The installation instructions are here. If you want to install from source, see CONTRIBUTING.md.

Documentation & Help

General information, tutorials, and precompiled binaries can be found on the mitmproxy website.

mitmproxy.org

The documentation for mitmproxy is available on our website:

mitmproxy documentation stable mitmproxy documentation dev

If you have questions on how to use mitmproxy, please use GitHub Discussions!

mitmproxy discussions

Contributing

As an open source project, mitmproxy welcomes contributions of all forms.

Dev Guide