Commit Graph

434 Commits (4a6570567a25c9e187cdba40deb5dbe4a4b2cd91)

Author SHA1 Message Date
Roger A. Light 4d1b587e29 dynsec: Forbid deleting the anon group. 3 years ago
Roger A. Light 5d18962486 Improve custom SSL_CTX tests.
Issue #2463.
3 years ago
Roger A. Light 02b92b97ef Fix use of MOSQ_OPT_SSL_CTX when used with MOSQ_OPT_SSL_CTX_DEFAULTS
Closes #2463. Thanks to Tim Nordell.
3 years ago
Roger A. Light 351911bd8f Fix incorrect return code being sent in DISCONNECT.
This is for when a client session is taken over.

Closes #2607. Thanks to der-b
3 years ago
Roger A. Light 3e1cf8a80b Fix tests build. 3 years ago
Roger A. Light 09ac578459 Fix unused flags in CONNECT command being forced to be 0 in MQTT v3.1
This check is not required until v3.1.1.

Closes #2522. Thanks to garinocyr
3 years ago
Roger A. Light 41b1b0c6d1 Merge branch 'XavierDooms-fix-support-tick-with-per-listener-settings' into fixes 4 years ago
Roger A. Light 62c0d0c9c8 Merge branch 'fix-support-tick-with-per-listener-settings' of https://github.com/XavierDooms/mosquitto into XavierDooms-fix-support-tick-with-per-listener-settings 4 years ago
Olivier Gayot b7fb911428 tests: replace use of ssl.wrap_socket that throws warnings in Python 3.10
The function ssl.wrap_socket() is deprecated starting Python 3.7 because
it does not support hostname matching (which is considered insecure). In
Python 3.10, the function now throws warnings at runtime, which makes
Ubuntu / Debian autopkgtest fail.

The function ssl.SSLContext.wrap_socket comes in as the replacement and
has support for SNI and hostname matching.

Replaced all uses of ssl.wrap_socket() by equivalent using
ssl.SSLContext.wrap_socket().

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
4 years ago
Xavier Dooms bff71fd99f support plugin tick callbacks with per_listener_settings enabled
add tests for the plugin tick

Signed-off-by: Xavier Dooms <dooms.xavier@gmail.com>
4 years ago
Roger A. Light 11975332d4 Fix mosquitto_topic_matches_sub2() not using the length parameters.
Closes #2364. Thanks to Jens Alfke.
4 years ago
Roger A. Light 0d0a36906c Add missing stubs. 4 years ago
Roger Light 5cae4d1d81 Fix broker sending duplicate CONNACK on failed MQTT v5 reauthentication.
Closes #2339. Thanks to hvxl.
4 years ago
Roger A. Light 3b471c8669 Fix test 4 years ago
Roger A. Light a1a190b482 Pointless whitespace tidy. 4 years ago
Roger A. Light c28110d079 Fix test 4 years ago
Roger A. Light f7a57add81 Add NanoMQ crash test case. 4 years ago
Roger A. Light 7b58eee414 Fix problem parsing config files with Windows line endings.
Closes #2297. Thanks to all the people who commented there!
4 years ago
Roger A. Light 330bf6efdc Various fixes around inflight quota management.
Closes #2306. Thanks to canique.
4 years ago
Roger A. Light 7551a29985 Fix LWT messages not being delivered if `per_listener_settings` was set to true
Closes #2314. Thanks to Marc Hamel.
4 years ago
Roger A. Light 37b5aedcb6 Fix for #575314.
Incoming QoS 2 messages that had not completed the QoS flow were not being
checked for ACL access when a clean session=False client was reconnecting.

Closes #575314.
4 years ago
Roger A. Light 9d6a73f9f7 Fix CONNECT performance with many user-properties.
An MQTT v5 client connecting with a large number of user-property properties
could cause excessive CPU usage, leading to a loss of performance and
possible denial of service. This has been fixed.
4 years ago
Roger Light 32af599c81 Fix $share subscriptions not being recovered for durable clients.
If a plugin had granted ACL subscription access to a
durable/non-clean-session client, then removed that access, the client would
keep its existing subscription. This has been fixed.
4 years ago
Roger Light ba2ca33671 Strict protocol compliance fixes, and extensive test suite. 4 years ago
Roger Light 723b5d7081 Fix listener mount_point not being removed on outgoing messages.
Closes #2244. Thanks to alflexRH.
4 years ago
Roger Light 93b2232bb9 Apply max_keepalive to MQTT v3.1.1 and v3.1 clients. 4 years ago
Roger A. Light fc4099eafa Speed up tests. 4 years ago
Roger A. Light 79542158f4 Fix `max_connections` option not being correctly counted. 4 years ago
Roger A. Light eec1ef1c55 Parallelise bridge clean session test. 4 years ago
Roger A. Light 1ab6b28e26 Add missing test file. 4 years ago
Roger A. Light 42163634c7 Fix leak on crafted MQTT v5 CONNECT.
If a MQTT v5 client connects with a crafted CONNECT packet a memory leak
will occur.

Thanks to Kathrin Kleinhammer.
4 years ago
Roger A. Light 6a4a547892 Fix segfault on client sending malformed CONNACk.
CVE-xxxx-xxxx: If an authenticated client connected with MQTT v5 sent a
malformed CONNACK message to the broker a NULL pointer dereference occurred,
most likely resulting in a segfault. This will be updated with the CVE
number when it is assigned.
Affects versions 2.0.0 to 2.0.9 inclusive.

Closes #2163. Thanks to Bryan Pearson.
5 years ago
Roger A. Light e401def06d Fix QoS 0 messages not being delivered when max_queued_bytes was configured.
Closes #2123. Thanks to quackgizmo.
5 years ago
Roger A. Light 7baca428da Remove obsolete tests. 5 years ago
Roger A. Light 706a1f3f29 Fix more minor compiler warnings. 5 years ago
Roger A. Light cf1098eff1 Send protocol error on topic alias not found.
The error topic-alias-invalid was being sent if an MQTT v5 client published
a message with empty topic and topic alias set, but the topic alias hadn't
already been configured on the broker. This has been fixed to send a
protocol error, as per section 3.3.4 of the specification.
5 years ago
Roger A. Light 3c58ac9308 Fix `message_size_limit` not applying to the Will payload.
Closes #2022. Thanks to Umberto Morelli.
5 years ago
Roger A. Light 5e6b34f81a Fix test. 5 years ago
Roger Light 113603168b Fix LWT not being sent on client takeover.
This was not happening for the case when the existing session wasn't
being continued.

Closes #1946. Thanks to Rory Piper.
5 years ago
Roger A. Light 04c110183c Bridge support for MQTT v5 maximum-qos. 5 years ago
Roger A. Light 7d05f70fe1 Fix mosq_test.py to_string() on Python 3 5 years ago
Roger A. Light ed28c416e9 Null checks in client tests. 5 years ago
Roger A. Light 6bd45f0092 dynsec: Better test coverage 5 years ago
Roger A. Light aaf30dc622 dynsec: Fix incorrect test command. 5 years ago
Roger A. Light 31e3fa4d07 dynsec: Invalid UTF-8 tests, plus some fixes. 5 years ago
Roger A. Light c303c67461 dynsec: Return group not found on getGroup. 5 years ago
Roger A. Light ad8cf9fc03 dynsec: Start of invalid role commands tests. 5 years ago
Roger A. Light 423e1a00d2 dynsec: Tests for group commands with invalid params, plus fixes. 5 years ago
Roger A. Light 7ccf4c44fd dynsec: Tests for invalid client command input. 5 years ago
Roger A. Light f6e17b81b9 dynsec: More modifyRole test coverage. 5 years ago