Skip to content

Commit 29b797c

Browse files
authored
Fix 2254 (#2271)
* start new dev branch; add audit file * add new release key (Crossbar.io 26.7 public key) * Finalize 26.7.1: codename 'Shields Up' + accept max_message_size=0 (#2254) Release-prep content for 26.7.1: - Assign the 26.7 series codename 'Shields Up' (crossbar/_codename.py) — the release raises the router's shields against oversized / decompression-bomb payloads. Required by the release gate (test_codename.py). The startup banner picks it up automatically via get_codename_suffix(__version__). - Accept max_message_size=0 (= unlimited) on WebSocket transports, matching the documented '0 = allow any size'. check_transport_max_message_size() rejected < 1, so 0 (a valid autobahn 'unlimited') was refused despite the docs — the small doc-vs-validator gap noted while doing #2253; agreed to fold here. The RawSocket validator is unchanged (protocol minimum is 512; it has no 'unlimited'). - Changelog entries for the codename and the max_message_size=0 fix. Note: This work was completed with AI assistance (Claude Code). * chore: bump version to 26.7.1 * Fix stale ReadTheDocs URLs: crossbar -> crossbario (#2254) The RTD project slug changed from 'crossbar' to 'crossbario', so the docs badge in README.md rendered red ('failing') and its link 404'd. Update the RTD project badge and docs URL (readthedocs.org/projects/crossbar + crossbar.readthedocs.io -> the '...crossbario...' equivalents) in README.md, docs/index.rst (badge + target), docs/conf.py (ogp_site_url) and docs/releases.rst (per-version links). The PyPI badges (img.shields.io/.../crossbar.svg, pypi.org/pypi/crossbar) and the GitHub links (github.com/crossbario/crossbar) are correct and left unchanged — only the ReadTheDocs project/domain moved. Verified from asgard1 (after RTD egress was unblocked): crossbario.readthedocs.io -> 200 (old crossbar.readthedocs.io -> 404); projects/crossbario badge -> passing (old crossbar badge -> failing). Note: This work was completed with AI assistance (Claude Code).
1 parent fe20525 commit 29b797c

14 files changed

Lines changed: 39 additions & 14 deletions

.audit/oberstet_fix_2254.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
- [ ] I did **not** use any AI-assistance tools to help create this pull request.
2+
- [x] I **did** use AI-assistance tools to *help* create this pull request.
3+
- [x] I have read, understood and followed the projects' [AI Policy](https://github.com/crossbario/autobahn-python/blob/main/AI_POLICY.md) when creating code, documentation etc. for this pull request.
4+
5+
Submitted by: @oberstet
6+
Date: 2026-07-17
7+
Related issue(s): #2254
8+
Branch: oberstet:fix_2254

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![PyPI](https://img.shields.io/pypi/v/crossbar.svg)](https://pypi.python.org/pypi/crossbar)
44
[![Python](https://img.shields.io/pypi/pyversions/crossbar.svg)](https://pypi.python.org/pypi/crossbar)
55
[![CI](https://github.com/crossbario/crossbar/workflows/main/badge.svg)](https://github.com/crossbario/crossbar/actions?query=workflow%3Amain)
6-
[![Docs](https://readthedocs.org/projects/crossbar/badge/?version=latest)](https://crossbar.readthedocs.io/en/latest/)
6+
[![Docs](https://readthedocs.org/projects/crossbario/badge/?version=latest)](https://crossbario.readthedocs.io/en/latest/)
77
[![License](https://img.shields.io/pypi/l/crossbar.svg)](https://github.com/crossbario/crossbar/blob/master/LICENSE)
88
[![Downloads](https://img.shields.io/pypi/dm/crossbar.svg)](https://pypi.python.org/pypi/crossbar)
99

docs/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ Changelog
88
26.7.1
99
------
1010

11+
* new: release codename for the **26.7 series — "Shields Up"** — this release raises the router's shields against oversized and decompression-bomb payloads (`#2254 <https://github.com/crossbario/crossbar/issues/2254>`_)
1112
* new: coordinated WAMP **26.7.1 release train** — pin ``autobahn>=26.7.1`` for the WebSocket permessage-deflate decompression-bomb fix (advisory ``GHSA-hxp9-w8x3-p566``) and relock ``uv.lock`` to the coordinated set (autobahn 26.7.1, zlmdb 26.7.1); ``cfxdb`` and ``txaio`` remain at 26.6.1 (`#2250 <https://github.com/crossbario/crossbar/issues/2250>`_)
1213
* **⚠ behaviour change** — ``max_message_size`` now **defaults to 16 MB** (``2**24``) on **both** the WebSocket and RawSocket transports (secure by default). Previously the WebSocket default was ``0`` (unlimited) while RawSocket already defaulted to 16 MB, so a WebSocket transport that did not set the option accepted messages of any size — leaving the router unbounded by default and the ``GHSA-hxp9-w8x3-p566`` protection effectively opt-in. Messages larger than 16 MB on a WebSocket transport with no explicit ``max_message_size`` are now rejected (close code 1009, ``MESSAGE_TOO_BIG``). Set ``max_message_size`` explicitly if you need more — ``0`` allows any size, and WebSocket permits up to 64 MB (RawSocket cannot exceed 16 MB by protocol) (`#2251 <https://github.com/crossbario/crossbar/issues/2251>`_)
1314
* fix: range-validate WebSocket ``max_frame_size`` (``[0, 64 MB]``, ``0`` = unlimited). It was type-checked only, so a negative value passed ``crossbar check`` and — because autobahn enforces frames with ``0 < maxFramePayloadSize < length`` — silently *disabled* the frame limit instead of tightening it (`#2253 <https://github.com/crossbario/crossbar/issues/2253>`_)
15+
* fix: accept ``max_message_size: 0`` (= unlimited) on WebSocket transports, matching the documented "0 = allow any size"; the range validator previously rejected ``0`` (`#2254 <https://github.com/crossbario/crossbar/issues/2254>`_)
1416
* fix: validate RawSocket ``max_message_size`` over its actual protocol range ``[512, 16 MB]`` with a dedicated validator. It previously reused the WebSocket-shaped ``[1, 64 MB]`` check, so a RawSocket config with ``max_message_size`` below 512 or above 16 MB passed ``crossbar check`` but then raised ``AssertionError`` at transport start (autobahn's factory asserts the WAMP RawSocket handshake range ``2**(9+n)``, i.e. ``[512, 16 MB]``). Also corrects ``docs/RawSocket-Transport.rst``: the documented range (``1–64 MB``) and default (``128 kB``) were both wrong — the real default is 16 MB (`#2252 <https://github.com/crossbario/crossbar/issues/2252>`_)
1517
* fix: validate WebSocket ``compression`` transport configuration. ``check_websocket_compression()`` was an empty stub yet wired into ``check_websocket_options()``, so unknown codecs, unknown or mis-typed deflate attributes and out-of-range ``request_max_window_bits`` / ``max_window_bits`` / ``memory_level`` were all silently accepted and only surfaced (if at all) as a run-time error deep inside the compression backend (`#2250 <https://github.com/crossbario/crossbar/issues/2250>`_)
1618
* new: functional test asserting the router rejects a decompression ("zip") bomb — a payload tiny on the wire but inflating far past the transport's ``max_message_size`` — on its *uncompressed* reassembled size (close code 1009). Verified a genuine regression test: it fails against autobahn < 26.7.1 and passes against 26.7.1 (`#2250 <https://github.com/crossbario/crossbar/issues/2250>`_)

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
spelling_show_suggestions = True
189189

190190
# -- OpenGraph (Social Media Meta Tags) -------------------------------------
191-
ogp_site_url = "https://crossbar.readthedocs.io/en/latest/"
191+
ogp_site_url = "https://crossbario.readthedocs.io/en/latest/"
192192

193193
# -- Auto Section Anchors Configuration --------------------------------------
194194
# Force overwrite of auto-generated ids (id1, id2, etc.) with slug-based anchors

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ WAMP Router for Distributed & Decentralized Microservices
99
:target: https://pypi.python.org/pypi/crossbar
1010
.. |CI| image:: https://github.com/crossbario/crossbar/workflows/main/badge.svg
1111
:target: https://github.com/crossbario/crossbar/actions?query=workflow%3Amain
12-
.. |Docs| image:: https://readthedocs.org/projects/crossbar/badge/?version=latest
13-
:target: https://crossbar.readthedocs.io/en/latest/
12+
.. |Docs| image:: https://readthedocs.org/projects/crossbario/badge/?version=latest
13+
:target: https://crossbario.readthedocs.io/en/latest/
1414
.. |License| image:: https://img.shields.io/pypi/l/crossbar.svg
1515
:target: https://github.com/crossbario/crossbar/blob/master/LICENSE
1616
.. |Downloads| image:: https://img.shields.io/pypi/dm/crossbar.svg

docs/releases.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ For detailed changelog entries, see :doc:`changelog`.
2222

2323
* `GitHub Release <https://github.com/crossbario/crossbar/releases/tag/v23.1.2>`__
2424
* `PyPI Package <https://pypi.org/project/crossbar/23.1.2/>`__
25-
* `Documentation <https://crossbar.readthedocs.io/en/v23.1.2/>`__
25+
* `Documentation <https://crossbario.readthedocs.io/en/v23.1.2/>`__
2626

2727
23.1.1
2828
------
2929

3030
* `GitHub Release <https://github.com/crossbario/crossbar/releases/tag/v23.1.1>`__
3131
* `PyPI Package <https://pypi.org/project/crossbar/23.1.1/>`__
32-
* `Documentation <https://crossbar.readthedocs.io/en/v23.1.1/>`__
32+
* `Documentation <https://crossbario.readthedocs.io/en/v23.1.1/>`__
3333

3434
22.6.1
3535
------

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "crossbar"
7-
version = "26.6.1"
7+
version = "26.7.1"
88
description = "Crossbar.io multi-protocol (WAMP/WebSocket, REST/HTTP, MQTT) application router for microservices."
99
readme = "README.md"
1010
requires-python = ">=3.11"

src/crossbar/_codename.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
# crossbar/test/test_codename.py).
2828
_CODENAMES: Dict[Tuple[int, int], str] = {
2929
(26, 6): "Resistance Is Futile",
30+
(26, 7): "Shields Up",
3031
}
3132

3233

src/crossbar/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
#
66
#####################################################################################
77

8-
__version__ = "26.6.1"
8+
__version__ = "26.7.1"
99
__build__ = "19000101-0000000"

src/crossbar/common/checkconfig.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,8 @@ def check_endpoint_timeout(timeout):
10111011

10121012
def check_transport_max_message_size(max_message_size):
10131013
"""
1014-
Check the ``max_message_size`` parameter for a WebSocket transport ([1, 64MB]).
1014+
Check the ``max_message_size`` parameter for a WebSocket transport
1015+
([0, 64MB], ``0`` = unlimited — the documented spelling).
10151016
10161017
RawSocket has a narrower, protocol-imposed range and its own validator, see
10171018
:func:`check_transport_rawsocket_max_message_size`.
@@ -1023,11 +1024,10 @@ def check_transport_max_message_size(max_message_size):
10231024
raise InvalidConfigException(
10241025
"'max_message_size' attribute in transport must be int ({} encountered)".format(type(max_message_size))
10251026
)
1026-
if max_message_size < 1 or max_message_size > 64 * 1024 * 1024:
1027+
if max_message_size < 0 or max_message_size > 64 * 1024 * 1024:
10271028
raise InvalidConfigException(
1028-
"invalid value {} for 'max_message_size' attribute in transport (must be from [1, 64MB])".format(
1029-
max_message_size
1030-
)
1029+
"invalid value {} for 'max_message_size' attribute in transport "
1030+
"(must be from [0, 64MB], 0 = unlimited)".format(max_message_size)
10311031
)
10321032

10331033

0 commit comments

Comments
 (0)