Roger A. Light
32969169f7
Trim whitespace from acl topics.
6 years ago
Roger A. Light
70fd600c3a
Fix trailing whitespace not being trimmed on acl users.
...
Closes #1539 . Thanks to CliveJL and LeonPoon.
6 years ago
Roger A. Light
9a0de5ef61
Free log_timestamp_format on exit.
...
Closes #1523 . Thanks to Basavesh Shivakumar.
6 years ago
Roger A. Light
11ece604c4
Merge branch 'bugfix-MemLeak_in_handle_unsubscribe' of git://github.com/panava/mosquitto into panava-bugfix-MemLeak_in_handle_unsubscribe
6 years ago
Roger A. Light
3220790790
Merge branch 'bugfix-MemoryLeak_in_persist_read' of git://github.com/panava/mosquitto into panava-bugfix-MemoryLeak_in_persist_read
6 years ago
Roger A. Light
50735afb5b
Fix for internal logging not printing.
6 years ago
Panagiotis Vasilikos
618413e1d2
Resource leak in persist_read.c
...
Reason: In lines 435 and 439, the function returns without calling closing
fptr which was opened at line 399.
Fix: I added fclose(fptr) statements before each of the returns.
Signed-off-by: Panagiotis Vasilikos <panagiotis.vasilikos@alexandra.dk>
6 years ago
Roger A. Light
9ae38788dc
Fix config->user not being freed on exit.
...
Closes #1564 . Thanks to back1127.
6 years ago
Roger A. Light
812c0636d5
Satisfy valgrind when exiting on error.
...
This is when due to not being able to open a listening socket, solved by
calling freeaddrinfo in the error cases.
Closes #1565 . Thanks to back1127.
6 years ago
Roger A. Light
e7c9f009bd
Strip whitespace from end of config file string options.
...
Closes #1566 . Thanks to kollokollo.
6 years ago
Panagiotis Vasilikos
49bf788862
Memory leak in handle_unsubscribe.c
...
Reason: In line 70, the memory allocation for the pointer reasons_codes may
result to a memory leak due to the many returns (e.g as the one in line 78)
occuring in the program's path until reaching the mosquitto__free at line 122.
Fix: I added a mosquitto__free(reason_codes) statement before each return
statement that could result to a memory leak
Signed-off-by: Panagiotis Vasilikos <panagiotis.vasilikos@alexandra.dk>
6 years ago
Panagiotis Vasilikos
0f7052564c
Memory leak in handle_unsubscribe.c
...
Reason: In line 70, the memory allocation for the pointer reasons_codes may
result to a memory leak due to the many returns (e.g as the one in line 78)
occuring in the program's path until reaching the mosquitto__free at line 122.
Fix: I moved the memory allocation code block (lines 69-73) just before
the line 102. This is the first place the pointer reason_codes is used, while
the following mosquitto__free operators free the allocated memory correctly.
Signed-off-by: Panagiotis Vasilikos <panagiotis.vasilikos@alexandra.dk>
6 years ago
Roger A. Light
5528dde56a
Fix possible null dereferences.
6 years ago
Roger A. Light
05ec02b3f3
Remove dead values.
6 years ago
Roger A. Light
18f0508a6e
Fix dereference before null check.
...
Coverity Scan 1405815.
6 years ago
Roger A. Light
db62f9843f
Fix unused value being overwritten.
...
Coverity Scan 1400727.
6 years ago
Roger A. Light
d452ea138b
Use presence of password file as indicator for authentication checks.
...
Previously, authentication checks would only take place if usernames
were defined in the password file.
Closes #1545 . Thanks to Timothy Godfrey.
6 years ago
Roger A. Light
b6119bb759
Check ACL patterns for validity when loading.
...
Closes #1539 . Thanks to Leon Poon.
6 years ago
Roger A. Light
c8789180f3
Fix session expiry with very large expiry intervals.
...
Closes #1525 . Thanks to Christoph Krey.
6 years ago
Roger A. Light
6dec2b468b
Remove redundant expiry checks
...
This is all now handled in session_expiry.c, through session expiry interval/time.
6 years ago
Roger A. Light
a46b45b006
Fix persistent_client_expiration not being used
...
Closes #1494 . Thanks to Christoph Krey.
6 years ago
Roger A. Light
05171b266d
Fix TLS Websockets clients not receiving messages.
...
This can occurs after one client takes over a previous connection.
Closes #1489 . Thanks to Bas Verhoeven.
6 years ago
Roger A. Light
b622aaeee4
Fix messages with an expiry interval missing the property.
...
They would be be sent without an expiry interval property just before
they were expired.
Closes #1464 . Thanks to Dustin Sallings.
6 years ago
Roger A. Light
06a27e799f
Fix retained messages with an expiry interval not being expired.
...
This happened after being restored from persistence.
Closes #1464 . Thanks to Dustin Sallings.
6 years ago
Roger A. Light
253326dcc9
Fix problems with reloading config when `per_listener_settings` was true.
...
Closes #1459 . Thanks to Thomas Markin Klein.
6 years ago
Roger A. Light
cfacd961c9
Only a single CRL could be loaded at once. This has been fixed.
...
Closes #1442 . Thanks to charlemagnelasse.
6 years ago
Roger A. Light
c471dfb201
Fix sub topics being limited to 200 chars instead of 200 levels
...
Closes #1441 . Thanks to Christoph Krey.
6 years ago
Roger A. Light
b942b73b6d
Fix incorrect memory tracking causing problems with memory_limit option.
...
Closes #1437 . Thanks to Guillaume Bour.
6 years ago
Roger A. Light
4db1e80410
More allow_zero_length_clientid fixes.
...
Closes #1429 . Thanks to Dustin Sallings.
6 years ago
Roger A. Light
539c1b9bcb
Tests for zero length client id, plus fix for one case where it was allowed
6 years ago
Roger A. Light
6a01453ce0
Build fixes.
6 years ago
Roger A. Light
9584463c75
Fix potential crash when reloading config.
...
Closes #1424 , #1425 . Thanks to JinPingChng and peteakalad.
6 years ago
Roger A. Light
1a8c44b84f
Fix regression on use of `mosquitto_connect_async()` not working.
...
Closes #1415 and #1422 . Thanks to Karl Palsson, Till Zimmermann and Liam Fry.
6 years ago
Roger A. Light
096380fbdc
Add workaround for libwebsockets 3.2.0.
6 years ago
Roger A. Light
2fd7f5270a
mosquitto_passwd returns 1 on an error condition
...
When attempting to update a user that does not exist.
Closes #1414 . Thanks to kdgde.
6 years ago
Roger A. Light
1066750931
Restrict topic hierarchy to 200 levels to prevent possible stack overflow.
...
Closes #1412 . Thanks to Ryan Shaw.
6 years ago
Roger A. Light
0a0ad4cd6c
Fix for old libwebsockets versions.
6 years ago
Roger A. Light
ce68040f22
Refuse to compile with lws 3.2.0.
6 years ago
Roger A. Light
8f6ac1b64a
Fix for websockets regression.
6 years ago
Roger A. Light
5941291bd5
Fix build WITH_TLS=no
6 years ago
Roger A. Light
9ad5fe7d95
Fix repeated "Error in poll" messages on Windows.
...
This occurs when only websockets listeners are defined.
Closes #1391 . Thanks to stopak.
6 years ago
Roger A. Light
4dc98c4cef
Fix CRL file not being reloaded on HUP.
...
Closes #35 .
6 years ago
Roger Light
31f09d1206
Merge pull request #1405 from woelfman/fix-engine-key-uri
...
Fix usage of tls_engine and tls_keyform.
6 years ago
Matt Woelfel
39803e538f
Fix usage of tls_engine and tls_keyform.
...
The current implementation does not properly forward the engine
parameters to OpenSSL causing OpenSSL to incorrectly attempt to open the
engine key uri as a file.
Sponsored-by: Trimble, Inc.
Signed-off-by: Matt Woelfel <matt@woelfware.com>
6 years ago
Roger A. Light
034324c46d
Fix websockets 3.2 causing slow connection on non-websockets listeners
...
Closes #1406 . Thanks to pbrenna.
6 years ago
Roger A. Light
5fd92cbfbd
Further fix for #1401 .
6 years ago
Roger A. Light
3c35c6cdd9
Fix Will not being sent if will delay greater than session expiry.
...
Closes #1401 . Thanks to Will Lisac.
6 years ago
Roger A. Light
f1516f86cb
Improve error messages in some situations when clients disconnect.
...
Reduces the number of "Socket error on client X, disconnecting"
messages.
6 years ago
Roger A. Light
779c6cc234
Fix leak introduced in previous commit.
6 years ago
Roger A. Light
f6b22f8248
Fix clients using `use_identity_as_*` being disconnected on SIGHUP.
...
Closes #1402 . Thanks to twegener-embertec.
6 years ago
Roger A. Light
4658dba6b3
Fix slow websockets performance when sending large messages.
...
Closes #1390 . Thanks to aalibasic.
6 years ago
Roger A. Light
4c4ca38938
Fix support for libwebsockets 3.x.
6 years ago
YangHau
abfdc2f8a6
Remove useless if statement
...
If statement for detecting if a pointer is NULL
is totally unnecessary.
Signed-off-by: YangHau <vulxj0j8j8@gmail.com>
6 years ago
Roger A. Light
50695f8103
Fix v5 DISCONNECT packets with remaining length == 2.
...
These were being treated as a protocol error.
Closes #1367 . Thanks to Frank Pagliughi.
6 years ago
Roger Light
07d2504bf5
Merge pull request #1254 from ccvca/fix_passwd_len
...
Fix password input when MAX_BUFFER_LEN is not 1024 in mosquitto_passwd.c
6 years ago
Roger A. Light
efc8ed39af
Fix incoming msgs not being removed when there are no subs
...
Fix incoming messages not being removed for a client if the topic being
published to does not have any subscribers.
Closes #1322 . Thanks to Yannic Schröder.
6 years ago
Roger A. Light
696a9b8019
Fix incomgin QoS 2 with max_inflight_messages set to 1.
...
Closes #1332 . Thanks to xmas79.
6 years ago
Roger A. Light
d17d7c9229
Fix persistent clients being incorrectly expired on Raspberry Pis.
...
Closes #1272 . Thanks to BowenMarmot and addendumE.
6 years ago
Matevz Mihalic
0a5fbc403b
Fix plugin psk_key_get for v4
...
Signed-off-by: Matevz Mihalic <matevz.mihalic@gmail.com>
6 years ago
Roger A. Light
587debc013
Fix incoming/outgoing quota problems for QoS>0.
6 years ago
Roger A. Light
142d07f45a
Fix MQTT v5 overlapping subscription behaviour.
...
Clients now receive message from all matching subscriptions rather than
the first one encountered, which ensures the maximum QoS requirement is
met.
6 years ago
Roger A. Light
de695af8c0
Fix zero length client ids being rejected for MQTT v5 clients.
...
This was happening when clean start was set to true.
6 years ago
Roger A. Light
e51e40e95c
Fix incorrect shared subscription topic of '$shared.'
6 years ago
Roger A. Light
b42bb99ba6
Disable TLS renegotiation.
...
Client initiated renegotiation is considered to be a potential attack
vector against servers.
Closes #1257 . Thanks to Daniele Sluijters.
6 years ago
Roger Light
44d170053d
Merge pull request #1255 from etactica/ssl-fixes
...
Ssl fixes for ENGINE and UI includes
6 years ago
Roger A. Light
96d0a26902
Only add to disused if session expiry is 0.
6 years ago
Roger A. Light
5088202529
Fix persistent Websockets clients not receiving messages.
...
This occurs after they reconnect, having sent DISCONNECT
on a previous session.
Closes #1227 . Thanks to usernametaken.
6 years ago
Roger A. Light
3dd8eb722b
Colour internal logs for visibility.
6 years ago
Roger A. Light
00eee59ad9
Add 'extern "C"' on public headers.
...
mosquitto_broker.h and mosquitto_plugin.h
Thanks to Wolfgang Petroschka.
Closes #1290 .
6 years ago
Roger A. Light
a900e3a1a7
Mention mosquitto_broker.h in mosquitto_plugin.h.
6 years ago
Roger A. Light
f974b91084
Consistent ref counting inc and dec functions.
6 years ago
Roger A. Light
b4dfeb3767
Fix MQTT v5 clients not being able to specify a password without a username.
...
Thanks to Erik Moqvist.
Closes #1274 .
6 years ago
Roger A. Light
999c478c88
Fixes for bug #1273
...
* Fix Will message for a persistent client incorrectly being sent when the client reconnects after a clean disconnect.
* Fix Will message for a persistent client not being sent on disconnect.
* Fix mosquitto_pub not using the `-c` option.
Thanks to Yannic Schröder.
Closes #1273 .
6 years ago
Roger A. Light
ef3e52d40b
Fix default max_topic_alias listener config not being used.
...
This was not being copied to the in-use listener when compiled without
TLS support.
6 years ago
Roger A. Light
cd3877e628
Fix detection of incoming v3.1/v3.1.1 bridges.
...
Closes #1263 . Thanks to vrst37.
6 years ago
Karl Palsson
22303848e2
ssl: support openssl with ENGINE support disabled.
...
Alternatively, just drop support for this config.
Signed-off-by: Karl Palsson <karlp@etactica.com>
7 years ago
Christian von Arnim
324ed6be76
Fix password input when MAX_BUFFER_LEN is not 1024 in mosquitto_passwd.c
...
Signed-off-by: Christian von Arnim <christian.vonarnim@gmail.com>
7 years ago
Roger A. Light
e742c1c2f1
Fix $SYS/broker/version being incorrectly expired after 60 seconds.
...
Close #1245 . Thanks to Christoph Krey.
7 years ago
Roger A. Light
f64d3b1e5c
Fix broker originated messages not being sent.
...
This occurred when `check_retain_source` was set to true.
Closes #1245 . Thanks to Christoph Krey.
7 years ago
Roger A. Light
a9f17cea95
Fix Will message not allowing user-property properties.
7 years ago
Roger A. Light
eebdbc86c4
Fix access after free when v5 client with Will message disconnects.
...
The Will message has as its first property one of content-type,
correlation-data, payload-format-indicator, or response-topic.
Closes #1244 . Thanks to Christoph Krey.
7 years ago
Roger A. Light
42fb2f5538
Fix build for WITH_TLS=no.
...
Closes #1250 . Thanks to bmparr.
7 years ago
Roger A. Light
439575475c
Use CMAKE_INSTALL_* variables when installing in CMake.
...
Closes #1049 . Thanks to Greg Troxel.
7 years ago
Roger A. Light
efa649f451
Don't call ldconfig in CMake scripts.
...
Closes #1048 . Thanks to Greg Troxel.
7 years ago
Roger A. Light
3b4a5419c3
Build fixes around CFLAGS et al.
...
- Split CFLAGS and CPPFLAGS, and LDFLAGS and LDADD/LIBADD.
- test/unit now respects CPPFLAGS and LDFLAGS.
Closes #1232 . Thanks to Greg Troxel.
7 years ago
Roger A. Light
4dcd977932
Windows build fixes.
7 years ago
Roger A. Light
449103e960
Merge remote-tracking branch 'refs/remotes/origin/fixes'
...
Conflicts:
ChangeLog.txt
7 years ago
Roger A. Light
3e6cb42a40
Fix minor Coverity issues
...
1400727 - unused value
1400726 - dereference after null check
1400728 - derefence before null check
7 years ago
Roger A. Light
689989cc56
Fix inflight quota inc/dec for both broker and library.
7 years ago
Roger A. Light
6438ce861e
Minor build variant fixes.
7 years ago
Roger A. Light
32fde3885c
Fix missing errors for websockets.
7 years ago
Roger A. Light
8531cb1d79
Separate broker message queues into in/out.
...
This allows and includes better flow control handling for QoS>0.
7 years ago
Roger A. Light
baf1909ffb
Improve some messages when client disconnects.
7 years ago
Roger A. Light
fb1979c0ea
Fix build on SmartOS due to missing IPV6_V6ONLY.
...
Thanks to Matt Ingenthron.
Closes #1212 .
7 years ago
Roger Light
77aaec686e
Merge pull request #1224 from omenlabs/ALPN
...
Bridge TLS Application-Layer Protocol Negotiation
7 years ago
Roger A. Light
638ab2f969
Fix unexpected behaviour when reusing a mid after a publish is denied.
7 years ago
Roger A. Light
8a651ff6c3
Remove remnant from before the conversion to utlist.
7 years ago
Roger A. Light
ad3b7ec778
Fix Coverity Scan 1400486-1400487. Unused values.
7 years ago
Roger A. Light
0d3c7fe778
Fix Coverity 1302840. No effect comparison.
7 years ago
Roger A. Light
e4d0d52b01
Fix Coverity Scan 1400483-1400485.
...
Logically dead code.
7 years ago