Commit Graph

1270 Commits (41a3a2068ee014ddfb7f07108ad5e6d4e718e329)

Author SHA1 Message Date
Roger A. Light 4a6570567a Merge branch 'x-forwarded-for-lws' of https://github.com/hardillb/mosquitto into hardillb-x-forwarded-for-lws 3 years ago
Ben Hardill 0eec37af99
Add support for X-Forwarded-For LWS
I know you've added this for the next release, but here is a fix
for LWS. But just incase there are any more 2.0.x releases.

It does leave the incoming port as 0 but as this is pretty meaningless
for a proxied connection I think it's probably ok.

Signed-off-by: Ben Hardill <hardillb@gmail.com>
3 years ago
Roger A. Light 7917553eb2 Fix expired messages causing queued messages not to be delivered.
Closes #2609. Thanks to JSchy65.
3 years ago
Roger A. Light cd88906132 Clearer function name 3 years ago
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.
3 years ago
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.
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 08610f7c99 Further fix for #2546. 3 years ago
Roger A. Light a913de2d28 Fix some PUBLISH messages not being counted in $SYS stats.
Closes #2448. Thanks to Antoine.
3 years ago
Roger A. Light 8c0600c40c Fixed build for openssl compiled with OPENSSL_NO_ENGINE.
Closes #2589. Thanks to Dirk Feytons.
3 years ago
Roger A. Light a146c218ad Fix unlimited message quota not being properly checked.
This is for incoming messages.

Closes #2593. Thanks to dongguoqing2015.
3 years ago
Roger A. Light c99502a256 Add clients to session expiry check list when restarting and reloading from persistence.
Closes #2546. Thanks to Joachim Schachermayer.
3 years ago
Roger A. Light 80b36919b1 Fix incorrect pointer use. 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
Abilio Marques 3c48b501e0 broker: fix memory leaks on plugin payload modification
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
4 years ago
Roger Light fad0b39eaa
Merge pull request #2408 from tjlusco/constant-restart-timeout-fix
Fix constant restart_timeout
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
Roger A. Light 96931643a4 Use strings.h for strcasecmp, except on Windows.
Closes #2420. Thanks to Frédéric Fauberteau.
4 years ago
Roger Light 378e96db22
Merge pull request #2430 from abiliojr/fix_invalid_pwd_msg
fix confusing log message on connack error
4 years ago
Abilio Marques 5f57de21cd Fix memory leak when modifying topics using the plugin API
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
4 years ago
Abilio Marques 26f747e0ac fix confusing log message on connack error
Signed-off-by: Abilio Marques <abiliojr@gmail.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
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>
4 years ago
Roger A. Light 94d61305fa Fix bridge not respecting receive-maximum when reconnecting with MQTT v5. 4 years ago
Roger A. Light 9e5b850181 Check for NULL before strcmp. 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 be80a3f4d0 Fix client id not showing in log on failed connections, where possible. 4 years ago
Roger A. Light a1a190b482 Pointless whitespace tidy. 4 years ago
Roger A. Light 7061569bf4 Don't send retained messages when a shared subscription is made. 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 d942ed7eec Fix `max_keepalive` option not being able to be set to 0. 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 9d95cba95e Fix leak. 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 A. Light 376226c129 Build warning fixes. 4 years ago
Roger A. Light 9b25dd3b0d libressl build fixes.
Closes #2198. Thanks to Theo Buehler.
4 years ago
Roger Light ba2ca33671 Strict protocol compliance fixes, and extensive test suite. 4 years ago
Roger Light 526b8430e2 Fix for #2283.
Closes #2283. Thanks to Heath Raftery.
4 years ago
Roger Light 93b2232bb9 Apply max_keepalive to MQTT v3.1.1 and v3.1 clients. 4 years ago
Roger A. Light ea371564e7 Disable TLS 1.3 when using TLS-PSK, because it isn't correctly config'd. 4 years ago
Roger A. Light 0143db71a1 Fix TLS certs and PSK not being able to be config'd at the same time. 4 years ago
Roger A. Light 2ace833eee Remove duplicate line 4 years ago
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.
4 years ago
Roger Light e3158e2b09
Merge pull request #2247 from Begasus/haiku
Haiku build fixes
4 years ago
begasus 0f49a9ff5b Haiku build fixes
Signed-off-by: begasus <begasus@gmail.com>
4 years ago
Roger A. Light 99d7299b24 Fix qos0 messages not being queued when queue_qos0_message enabled.
Closes #2224. Thanks to Luigi Caiffa.
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 403691ce40 Add missing return types. 4 years ago