Roger A. Light
c6c6850d5c
Whitespace tidy
2025-04-06 22:25:02 +01:00
Roger A. Light
664ca4eb16
Further fix for CVE-2023-28366.
2025-03-06 16:23:49 +00:00
Roger A. Light
4304ac0af0
Backport keepalive check from develop branch.
...
Closes #3138
2025-02-27 13:59:36 +00:00
Roger A. Light
cd0987a661
Fix potential deadlock in mosquitto_sub if -W
is used.
...
Closes #3175 . Thanks to Audric Schiltknecht
2025-02-27 00:02:26 +00:00
Arvin
a853be5008
fix leakage of mosq->tls_engine and User SSL Context
...
Signed-off-by: Arvin <icemanpeng@foxmail.com>
2025-02-26 12:53:40 +00:00
Roger A. Light
a8d887f30b
Merge branch 'fix2908' of github.com:ckrey/mosquitto into ckrey-fix2908
2025-02-25 12:34:41 +00:00
Roger A. Light
015fe3d687
Fix mismatched wrapped/unwrapped memory alloc/free in properties.
...
Closes #3192 . Thanks to Russell King.
2025-01-20 18:41:36 +00:00
Roger A. Light
0691935ed9
Fix RESERVED packets not being quickly rejected.
...
Closes #2325
2024-10-31 23:06:48 +00:00
Roger A. Light
67ef993d23
Fix pthreads linking on Windows for libmosquitto_static
...
Closes #3143
2024-10-30 17:33:06 +00:00
mzymon
e99a97b294
Fix 3239. Fixed replace mistake in lib/thread_mosq.c
...
Signed-off-by: mzymon <mzymon@proton.me>
2024-10-30 16:49:32 +00:00
mzymon
a111d92970
Fix 3239. Added COMPAT_ prefix to pthread_ calls
...
Signed-off-by: mzymon <mzymon@proton.me>
2024-10-30 16:49:32 +00:00
Roger A. Light
0174abe8f3
Don't allow invalid response-topic values.
2024-10-16 15:30:44 +01:00
Roger A. Light
88b7bb3521
Fix NetBSD build
2024-10-12 17:01:09 +01:00
Christoph Krey
30c9cdc22a
Check zero length topics and topic filters closes #2908
...
Signed-off-by: Christoph Krey <c@ckrey.de>
2024-10-12 08:15:40 +02:00
Roger A. Light
fecf4797d9
Open files with appropriate access on Windows.
...
Closes #3119 .
2024-10-11 17:56:49 +01:00
Roger A. Light
849a1d3f8e
Fix library cross compilation.
...
Closes #3129 .
2024-10-08 17:27:53 +01:00
Roger A. Light
30adcd6e39
Fix cmake build on OS X.
...
Closes #3125 .
2024-10-06 21:07:27 +01:00
Roger A. Light
8ab20b4ba4
Don't allow SUBACK with missing reason codes.
...
Closes Eclipse #190
2024-10-02 10:26:08 +01:00
Roger A. Light
7399ac67d1
Don't call memcpy with NULL destination, even with size=0
2024-10-02 10:25:33 +01:00
Carsten Andrich
d3975c8525
fix unused variable warning in net__socket_connect_tls()
...
Signed-off-by: Carsten Andrich <carsten@andrich.name>
2024-09-07 00:31:04 +01:00
Carsten Andrich
c22ced4915
fix unused parameter warning (only with cmake -DWITH_TLS=OFF) in mosquitto_void_option()
...
Signed-off-by: Carsten Andrich <carsten@andrich.name>
2024-09-07 00:31:04 +01:00
Roger A. Light
57b5549b3d
Fix "payload format invalid" not being allowed as a PUBREC reason code.
...
Thanks to mdrssv
2024-09-07 00:17:37 +01:00
Roger A. Light
f6d0ddcae0
Clear SSL error state to avoid spurious error reporting.
...
Thanks to koranyellow. Closes #3054 .
2024-09-06 23:56:42 +01:00
Diego Santa Cruz
688fa86de4
fix CLOCK_BOOTTIME use on kernels not having it
...
When the libc headers used to build mosquitto define CLOCK_BOOTTIME but
the kernel where mosquitto runs does not implement CLOCK_BOOTTIME, all
timestamps are wrong (uninitialized data), because there is no check for
the success of the clock_gettime() calls.
This adds probing for the availability of CLOCK_BOOTTIME from
mosquitto_lib_init(), falling back to CLOCK_MONOTONIC, and then modifies
mosquitto_time() to use the selected clock. Probing at init time avoids
having to do two clock_gettime() calls for every timestamp if
CLOCK_BOOTTIME is not available.
It also fixes a similar problem in mosquitto_lib_init().
Signed-off-by: Diego Santa Cruz <diego.santacruz@spinetix.com>
2024-09-06 23:41:56 +01:00
Flávio Tapajós
a87b5ff6d8
Increase logging of errors
...
commit 6113eac95a9df634fbc858be542c4a0456bfe7b9 started using MQTT_RC_*
enums as a handle__publish return value, which typically were MOSQ_ERR_*
values.
Signed-off-by: Flávio Tapajós <flavio.tapajos@newtesc.com.br>
2024-09-06 23:26:48 +01:00
Roger A. Light
a3e5deb952
Use vcpkg Windows build for 2.0, re-enable thread support
2024-04-21 22:28:26 +01:00
Roger A. Light
28590fa383
Remove unused headers
2023-11-15 22:45:38 +00:00
Gianfranco Costamagna
5b011ff112
Add dynamic symbols linking with cmake too
...
Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
2023-09-26 23:40:50 +02:00
Roger A. Light
97c25654ed
Add helper messages for lax permissions
2023-09-18 22:21:56 +01:00
Roger A. Light
bfb373d774
Fix max_queued_message 0
stopping clients from receiving messages.
...
Closes #2789 . Thanks to Daedaluz.
2023-08-22 07:40:54 +01:00
Roger A. Light
284db04bc3
Library will no longer allow single level wildcard certificates, e.g. *.com
2023-08-16 14:01:21 +01:00
Roger A. Light
6113eac95a
Fix for CVE-2023-28366
2023-08-16 14:01:21 +01:00
Roger A. Light
a3c680fbb0
Fix for Eclipse #581199
2023-08-16 14:01:21 +01:00
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
4093dad058
Merge pull request #2827 from bdesplanq/fix-engine-support
...
Fix engine keyfile support.
2023-08-15 14:09:01 +01:00
Roger A. Light
cb90e91126
Add missing mosquitto_strerror entries.
...
Closes #2799 . Thanks to n00b42
2023-08-12 10:12:52 +01:00
Bart Desplanques
105e30ff5b
Fix engine support.
...
Do not try to open keyfile when keyform is "engine": this is not necessarily a real file.
Dynamic engines require init with OPENSSL_INIT_ENGINE_DYNAMIC before they can be loaded.
Signed-off-by: Bart Desplanques <bart.desplanques@gmail.com>
2023-06-02 19:11:50 +02:00
Roger A. Light
269756a171
Fix high CPU use on slow TLS connect.
...
Closes #2794 . Thanks to Evgeny S.
2023-04-27 23:25:52 +01:00
Roger A. Light
1bf753e773
Fix confusing message on TLS certificate verification.
...
Closes #2746 . Thanks to Akos Vandra-Meyer.
2023-04-01 17:52:12 +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
Roger A. Light
6f61710fa7
Merge branch 'fixes' of github.com:Daedaluz/mosquitto into Daedaluz-fixes
2023-03-27 23:37:55 +01:00
Tobias Assarsson
2e2a420099
use CLOCK_BOOTTIME when available.
...
Signed-off-by: Tobias Assarsson <tobias.assarsson@gmail.com>
2023-03-02 09:04:59 +01:00
Roger Light
80a4063bb4
Merge pull request #2683 from guillaumepellegrino/fixes_memleak
...
Fix memory leak in mosquitto_tls_opts_set()
2022-12-07 22:41:29 +00:00
Roger A. Light
06d5835270
Add more WITH_BROKER guards.
2022-12-03 22:59:14 +00:00
Guillaume PELLEGRINO
9018f12dfc
Fix memory leak in mosquitto_tls_opts_set()
...
When calling mosquitto_tls_opts_set() multiple time in a row
on the same mosquitto context (Example: trying to reconnect
to mqtt broker), some of the tls options are not free, resulting in a memory leak.
The TLS options (tls_version, tls_ciphers) must be free before being set.
Signed-off-by: Guillaume PELLEGRINO <guillaume.pellegrino@yahoo.com>
2022-11-09 10:17:03 +01:00
Roger Light
7ff2198c7d
Merge pull request #2648 from impulsdampf22/fixes
...
Fixed empty string crash in mosquitto_property_copy_all
2022-11-03 18:43:13 +00:00
Roger A. Light
0cee0d1d11
Fix Coverity Scan 1486944 (backport from develop)
2022-10-26 10:06:38 +01:00
Alexander Fiebig
28416da47a
Fixed empty string crash in mosquitto_property_copy_all
...
Signed-off-by: Alexander Fiebig <alex.fiebig@online.de>
2022-10-08 19:08:21 +02:00
Roger A. Light
5c3c5d779f
Fix Coverity 1486949
2022-08-31 11:36:53 +01:00
Roger A. Light
49ebb58569
Fix failure to close thread in some situations.
...
Closes #2545 . Thanks to p-luke.
2022-08-15 22:17:00 +01:00