Commit Graph

1266 Commits

Author SHA1 Message Date
Roger A. Light
fa31b6f41d Fix bridge queued messages not being persisted.
This happens when local_cleansession is set to false and cleansession is
set to true.

Closes #2604. Thank to Frank Dekervel.
2022-08-13 22:46:19 +01:00
Roger A. Light
775bd2effd Fix confusing "out of memory" error.
This happens when a client is kicked in the dynamic security plugin.

Closes #2525. Thanks to sezanzeb.
2022-08-12 08:17:17 +01:00
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
2022-08-10 14:17:22 +01:00
Roger A. Light
08610f7c99 Further fix for #2546. 2022-08-09 21:25:55 +01:00
Roger A. Light
a913de2d28 Fix some PUBLISH messages not being counted in $SYS stats.
Closes #2448. Thanks to Antoine.
2022-08-08 00:29:37 +01:00
Roger A. Light
8c0600c40c Fixed build for openssl compiled with OPENSSL_NO_ENGINE.
Closes #2589. Thanks to Dirk Feytons.
2022-08-06 23:16:55 +01:00
Roger A. Light
a146c218ad Fix unlimited message quota not being properly checked.
This is for incoming messages.

Closes #2593. Thanks to dongguoqing2015.
2022-08-06 22:49:08 +01:00
Roger A. Light
c99502a256 Add clients to session expiry check list when restarting and reloading from persistence.
Closes #2546. Thanks to Joachim Schachermayer.
2022-05-23 23:05:49 +01:00
Roger A. Light
80b36919b1 Fix incorrect pointer use. 2022-05-23 22:38:02 +01:00
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
2022-05-17 17:41:57 +01:00
Abilio Marques
3c48b501e0 broker: fix memory leaks on plugin payload modification
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
2022-03-13 08:48:00 +01:00
Roger Light
fad0b39eaa
Merge pull request #2408 from tjlusco/constant-restart-timeout-fix
Fix constant restart_timeout
2022-02-24 15:55:36 +00:00
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 2022-02-24 13:26:06 +00:00
Roger A. Light
96931643a4 Use strings.h for strcasecmp, except on Windows.
Closes #2420. Thanks to Frédéric Fauberteau.
2022-02-24 12:02:16 +00:00
Roger Light
378e96db22
Merge pull request #2430 from abiliojr/fix_invalid_pwd_msg
fix confusing log message on connack error
2022-02-24 11:36:59 +00:00
Abilio Marques
5f57de21cd Fix memory leak when modifying topics using the plugin API
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
2022-02-11 21:41:26 +01:00
Abilio Marques
26f747e0ac fix confusing log message on connack error
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
2022-01-11 19:26:25 +01:00
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>
2021-12-27 23:23:58 +01:00
Lusco
366ec5c66e
Update conf.c
The default bridge configuration uses the backoff restart configuration, however this is not cleared if only a constant timeout is desired, causing it to always use the backoff configuration with a 30 second cap.

To trigger this error, use a bridge configuration with a constant timeout (e.g restart_timeout 5). Note that the timeout value is not honoured. 

Clear the backoff configuration when applying restart_timeout.

Signed-off-by: Trevor Luscombe <trevor.luscombe@gmail.com>
2021-12-16 14:14:24 +10:00
Roger A. Light
94d61305fa Fix bridge not respecting receive-maximum when reconnecting with MQTT v5. 2021-11-09 13:53:37 +00:00
Roger A. Light
9e5b850181 Check for NULL before strcmp. 2021-10-24 14:23:57 +01:00
Roger Light
5cae4d1d81 Fix broker sending duplicate CONNACK on failed MQTT v5 reauthentication.
Closes #2339. Thanks to hvxl.
2021-10-12 22:33:05 +01:00
Roger A. Light
be80a3f4d0 Fix client id not showing in log on failed connections, where possible. 2021-10-06 10:09:38 +01:00
Roger A. Light
a1a190b482 Pointless whitespace tidy. 2021-10-05 15:20:37 +01:00
Roger A. Light
7061569bf4 Don't send retained messages when a shared subscription is made. 2021-10-04 16:26:58 +01:00
Roger A. Light
7b58eee414 Fix problem parsing config files with Windows line endings.
Closes #2297. Thanks to all the people who commented there!
2021-09-23 11:40:40 +01:00
Roger A. Light
330bf6efdc Various fixes around inflight quota management.
Closes #2306. Thanks to canique.
2021-09-22 17:20:24 +01:00
Roger A. Light
7551a29985 Fix LWT messages not being delivered if per_listener_settings was set to true
Closes #2314. Thanks to Marc Hamel.
2021-09-21 22:51:25 +01:00
Roger A. Light
d942ed7eec Fix max_keepalive option not being able to be set to 0. 2021-09-09 12:19:13 +01:00
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.
2021-08-30 16:14:27 +01:00
Roger A. Light
9d95cba95e Fix leak. 2021-08-30 14:11:23 +01:00
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.
2021-08-26 12:17:26 +01:00
Roger A. Light
376226c129 Build warning fixes. 2021-08-26 10:54:03 +01:00
Roger A. Light
9b25dd3b0d libressl build fixes.
Closes #2198. Thanks to Theo Buehler.
2021-08-24 13:53:03 +01:00
Roger Light
ba2ca33671 Strict protocol compliance fixes, and extensive test suite. 2021-08-23 23:19:28 +01:00
Roger Light
526b8430e2 Fix for #2283.
Closes #2283. Thanks to Heath Raftery.
2021-08-21 20:14:51 +01:00
Roger Light
93b2232bb9 Apply max_keepalive to MQTT v3.1.1 and v3.1 clients. 2021-08-20 23:27:14 +01:00
Roger A. Light
ea371564e7 Disable TLS 1.3 when using TLS-PSK, because it isn't correctly config'd. 2021-08-19 17:26:04 +01:00
Roger A. Light
0143db71a1 Fix TLS certs and PSK not being able to be config'd at the same time. 2021-08-19 17:26:04 +01:00
Roger A. Light
2ace833eee Remove duplicate line 2021-08-17 12:26:52 +01:00
Roger A. Light
4e146b7b53 Fix possible out of bounds memory reads when reading configuration.
This would happen with a corrupt/crafted configuration file. Unless your
configuration file is writable by untrusted users this is not a risk.

Closes #567213. Thanks to Roland Sako.
2021-07-22 16:43:06 +01:00
Roger Light
e3158e2b09
Merge pull request #2247 from Begasus/haiku
Haiku build fixes
2021-07-09 14:16:21 +01:00
begasus
0f49a9ff5b Haiku build fixes
Signed-off-by: begasus <begasus@gmail.com>
2021-07-07 12:26:20 +00:00
Roger A. Light
99d7299b24 Fix qos0 messages not being queued when queue_qos0_message enabled.
Closes #2224. Thanks to Luigi Caiffa.
2021-06-09 13:21:27 +01:00
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.
2021-06-08 22:26:09 +01:00
Roger A. Light
403691ce40 Add missing return types. 2021-06-08 22:25:59 +01:00
Roger A. Light
238b68686a Fix bridge pollfd corruption on Windows.
Closes #2173. Thanks to Niclas Lindgren.
2021-06-08 13:29:29 +01:00
Roger A. Light
104b94db57 Fix non-reachable bridge blocking the broker on Windows.
Closes #2172. Thanks to Niclas Lindgren.
2021-06-08 12:07:24 +01:00
Roger A. Light
5851713f3e Refactor to remove duplicate code. 2021-06-08 12:00:05 +01:00
Roger A. Light
0e1388a615 Fix the return of plugin__handle_message not being fully handled. 2021-05-21 14:54:28 +01:00