Commit Graph

1292 Commits

Author SHA1 Message Date
Roger A. Light
4ca294fd9c Warn on lax permissions on sensitive files.
- Broker will log warnings if sensitive files are world readable/writable, or
  if the owner/group is not the same as the user/group the broker is running
  as. In future versions the broker will refuse to open these files.
2023-08-16 14:01:21 +01:00
Roger Light
9c295efe98
Merge pull request #2838 from NorbertHeusser/fix-no-expiry-on-outgoing-bridge
Do not add outgoing bridge connection context to session expiry list
2023-08-11 23:35:43 +01:00
Norbert Heusser
c749ed6fd5 Do not add outgoing bridge connection context to session expiry list on disconnect
Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2023-07-03 11:16:38 +00:00
linkkzz
18ea97c468 Fixes sub_count is not decreased when client ubsubscribe
Signed-off-by: linkkzz <jk588592@163.com>
2023-06-30 11:29:40 +08:00
Roger A. Light
3c51816009 Fix leak on error. 2023-04-12 11:52:26 +01:00
Roger A. Light
6d240a9d18 Fix bridges being expired after being restored.
This occurred with non-matching cleansession/local_cleansession being
expired on start after restoring from persistence.

Closes #2634. Thanks to everyone on the issue.
2023-04-08 09:15:46 +01:00
Roger A. Light
3b2f3c6d8a Windows: Increase connection limit to 8192 where supported.
Closes #2732. Thanks to zhousongsong.
2023-04-07 19:29:32 +01:00
Roger A. Light
5a748806d3 Default to max keepalive 0. 2023-04-01 22:19:54 +01:00
Roger A. Light
cc97f433c1 Use line buffered mode for stdout.
Closes #2354.
Closes #2749.
2023-04-01 21:16:07 +01:00
Roger A. Light
63da7472b5 Fix default settings incorrectly allowing TLS v1.1.
Closes #2722. Thanks to KramNamez.
2023-03-28 01:39:28 +01:00
Hyeongon Kim
19fbfee791 fixed a bug where broker's private-key file was not loaded
fixed a bug where the mosquitto-broker's private-key file(.pem)
dose not load with tls-engine.

Signed-off-by: Hyeongon Kim <khyeongon@gmail.com>
2023-02-06 15:02:30 +09:00
Roger A. Light
a6347cd7d2 Fix Coverity Scan 1501449. 2023-01-04 11:38:28 +00:00
Roger A. Light
62b68364c7 Fix std* files not being redirected when daemonising
This could occur when built with assertions removed.

Closes #2708. Thanks to ckoehne.
2022-12-16 16:19:51 +00:00
Roger Light
55e448e38d
Merge pull request #2699 from rswindell/include_inttypes
Fix build error: expected ‘)’ before ‘PRIu64’
2022-12-07 22:06:31 +00:00
Rob Swindell
7ff744d60d Fix build error: expected ‘)’ before ‘PRIu64’
system with 'make WITH_TLS=no WITH_CJSON=no WITH_DOCS=no'

Signed-off-by: Rob Swindell <rob@synchro.net>
2022-12-02 11:52:34 -08:00
Roger A. Light
8285a57bb9 Fix some error handling related to the bind_interface option. 2022-12-02 14:31:40 +00:00
Roger A. Light
c06599fab2 Fix some retained topic memory not being cleared immediately after used. 2022-11-29 11:55:55 +00:00
Roger A. Light
f44d8fad50 Fix Coverity 1491742 and 1491741 2022-08-31 10:00:05 +01:00
Roger A. Light
e22030bb2c Try to convince Coverity this string is terminated. 2022-08-31 09:49:37 +01:00
Roger A. Light
86fffa34a9 Fix $SYS messages being expired after 60 seconds
and hence unchanged values disappearing. Thanks to Wim Nelis and
Christoph Krey.
2022-08-22 15:57:14 +01:00
Roger A. Light
ef44b22cef Fix local bridge session expiry interval. 2022-08-18 15:06:11 +01:00
Roger A. Light
1af3152ddc Fix persisted clients being restored without a session expiry time. 2022-08-18 14:13:35 +01:00
Roger A. Light
4a6570567a Merge branch 'x-forwarded-for-lws' of https://github.com/hardillb/mosquitto into hardillb-x-forwarded-for-lws 2022-08-16 14:30:37 +01:00
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>
2022-08-16 13:54:06 +01:00
Roger A. Light
7917553eb2 Fix expired messages causing queued messages not to be delivered.
Closes #2609. Thanks to JSchy65.
2022-08-16 12:29:18 +01:00
Roger A. Light
cd88906132 Clearer function name 2022-08-16 12:28:13 +01:00
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