Commit Graph

665 Commits

Author SHA1 Message Date
Roger A. Light
499e2f2e98 Add support for unix sockets to broker, lib, and clients. 2019-10-08 20:55:31 +01:00
Roger A. Light
cfacd961c9 Only a single CRL could be loaded at once. This has been fixed.
Closes #1442. Thanks to charlemagnelasse.
2019-10-02 13:37:52 +01:00
Roger A. Light
c471dfb201 Fix sub topics being limited to 200 chars instead of 200 levels
Closes #1441. Thanks to Christoph Krey.
2019-10-02 13:00:01 +01:00
Roger A. Light
b942b73b6d Fix incorrect memory tracking causing problems with memory_limit option.
Closes #1437. Thanks to Guillaume Bour.
2019-10-01 16:57:54 +01:00
Roger A. Light
093c8f90f5 Fix publish props not being passed to v5 msg callback for QoS 2 msgs.
Closes #1432. Thanks to Magnus Galåen.
2019-09-26 16:47:34 +01:00
Roger A. Light
4db1e80410 More allow_zero_length_clientid fixes.
Closes #1429. Thanks to Dustin Sallings.
2019-09-26 11:53:58 +01:00
Roger A. Light
539c1b9bcb Tests for zero length client id, plus fix for one case where it was allowed 2019-09-26 11:14:52 +01:00
Roger A. Light
54ed3c0fc9 Merge branch 'master' into develop 2019-09-25 19:09:10 +01:00
Roger A. Light
b7d8eb1122 Bump version number. Update www. 2019-09-25 11:30:01 +01:00
Roger A. Light
9584463c75 Fix potential crash when reloading config.
Closes #1424, #1425. Thanks to JinPingChng and peteakalad.
2019-09-25 11:24:47 +01:00
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.
2019-09-24 20:15:04 +01:00
Roger A. Light
4b6cc208e2 Fix inflight max behaviour and option setting. 2019-09-24 11:26:25 +01:00
Roger A. Light
096380fbdc Add workaround for libwebsockets 3.2.0. 2019-09-24 10:21:51 +01:00
Roger A. Light
da5ff1746c Don't use / in auto client ids.
Also update client documentation about automatic client ids.
2019-09-24 10:05:42 +01:00
Roger A. Light
0a8358243b mosquitto_sub: Fix -E not working unless -d was also specified.
Closes #1418. Thanks to Lichard Torman.
2019-09-21 22:30:21 +01:00
Roger A. Light
9883652dde Bump version, update www and changelog. 2019-09-17 16:32:00 +01:00
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.
2019-09-17 09:37:16 +01:00
Roger A. Light
1066750931 Restrict topic hierarchy to 200 levels to prevent possible stack overflow.
Closes #1412. Thanks to Ryan Shaw.
2019-09-15 22:57:36 +01:00
Roger A. Light
6e2be25881 Bump version numbers, add release info. 2019-09-12 14:56:15 +01:00
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.
2019-09-11 15:53:36 +01:00
Roger A. Light
4dc98c4cef Fix CRL file not being reloaded on HUP.
Closes #35.
2019-09-11 09:08:02 +01:00
Roger A. Light
ee3591d228 Fix missing locks on mosq->state.
Closes #1374. Thanks to Jeff Trull.
2019-09-08 21:11:20 +01:00
Roger A. Light
3c35c6cdd9 Fix Will not being sent if will delay greater than session expiry.
Closes #1401. Thanks to Will Lisac.
2019-09-05 12:46:46 +01:00
Roger A. Light
f1516f86cb Improve error messages in some situations when clients disconnect.
Reduces the number of "Socket error on client X, disconnecting"
messages.
2019-09-05 12:31:52 +01:00
Roger A. Light
f6b22f8248 Fix clients using use_identity_as_* being disconnected on SIGHUP.
Closes #1402. Thanks to twegener-embertec.
2019-09-05 11:37:43 +01:00
Roger A. Light
ba918ac73e Fix reconnect backoff where connections are dropped
Closes #737. Thanks to chelliwell.
2019-09-04 22:20:13 +01:00
Roger A. Light
412379b03b Fix bridges potentially not connecting on Windows.
Closes #478.
2019-09-04 17:51:16 +01:00
Roger A. Light
76865707b2 Guard ssize_t definition on Windows.
Closes #522. Thanks to trinytron.
2019-09-04 17:41:50 +01:00
Roger A. Light
01530a3f07 Improve message_size_limit and various max_* option docs.
Closes #448.
2019-09-04 17:11:13 +01:00
Roger A. Light
ff676811d3 Client no longer generates random client ids for v3.1.1 clients
These are now expected to be generated on the broker. This matches the
behaviour for v5 clients.

Closes #291.
2019-09-04 15:56:13 +01:00
Roger A. Light
c1e488cb88 Add timeout return code (27) for sub/rr using -W.
Closes #275.
2019-09-04 14:29:26 +01:00
Roger A. Light
6f4e472260 Improve details on global/per listener options in the mosquitto.conf man page.
Closes #274.
2019-09-04 13:45:21 +01:00
Roger A. Light
4658dba6b3 Fix slow websockets performance when sending large messages.
Closes #1390. Thanks to aalibasic.
2019-08-29 14:12:58 +01:00
Roger A. Light
4c4ca38938 Fix support for libwebsockets 3.x. 2019-08-29 14:12:58 +01:00
Roger A. Light
570c3674fb Drop privs to nobody if mosquitto user does not exist. 2019-08-07 10:42:03 +01:00
Roger A. Light
a0e7165a9c Fix WITH_STATIC_LIBRARIES using CMake on Windows
Closes #1369. Thanks to TimmvonderMehden
2019-08-06 12:01:29 +01:00
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.
2019-08-05 21:13:23 +01:00
Roger A. Light
494d3d29a0 Fix missing function warnings on NetBSD.
Thanks to Greg Troxel.
2019-08-04 23:00:26 +01:00
Roger A. Light
ce3e33e890 Bump version number, add release post. 2019-08-01 20:46:50 +01:00
Roger A. Light
64c6d4d962 Fix properties not being sent on QoS>0 PUBLISH messages. 2019-08-01 15:47:48 +01:00
Roger A. Light
4253eca81c Fix memory leak when setting v5 properties in mosquitto_connect_v5() 2019-08-01 14:49:19 +01:00
Roger A. Light
a22ccbd884 Clients: improve error msgs when connecting v3.x broker with v5 client
Closes #1344. Thanks to HowJMay.
2019-08-01 11:40:55 +01:00
Roger A. Light
b9006487d1 Fix link in CONTRIBUTING.md.
Closes #1362. Thanks to Furkan Aksoy.
2019-08-01 10:30:13 +01:00
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.
2019-07-31 18:52:51 +01:00
Roger A. Light
696a9b8019 Fix incomgin QoS 2 with max_inflight_messages set to 1.
Closes #1332. Thanks to xmas79.
2019-07-30 23:25:12 +01:00
Roger A. Light
f21ccc362b Fix mosquitto_string_option(, MOSQ_OPT_TLS_KEYFORM, ) return value
`mosquitto_string_option(mosq, MOSQ_OPT_TLS_KEYFORM, ...)` was incorrectly
returning `MOSQ_ERR_INVAL` with valid input. This has been fixed.

Closes #1360. Thanks to Michael Dombrowski.
2019-07-30 18:46:52 +01:00
Roger A. Light
42237c0239 Make behaviour of mosquitto_connect[_async]() consistent.
`mosquitto_connect_async()` is now consistent with `mosquitto_connect()`
when connecting to a non-existent server.

Closes #1345. Thanks to Mohammad Reza.
2019-07-30 18:42:31 +01:00
Roger A. Light
b807daed28 Fix error codes not being returned when mosquitto_pub exits.
Closes #1354. Thanks to Ben Barbour.
2019-07-24 12:08:43 +01:00
Roger A. Light
3ad780839d Fix MQTT v5 sub opts being set for v3 subs.
Closes #1353. Thanks to Ben Barbour.
2019-07-24 11:25:46 +01:00
Roger Light
2b2afc93bc Allow other apps access to log file on Windows.
This change means that users with the appropriate security permissions
can open the log file for reading at the same time that it is being
written.

Closes #515.
2019-07-03 11:56:46 +01:00
Roger A. Light
d17d7c9229 Fix persistent clients being incorrectly expired on Raspberry Pis.
Closes #1272. Thanks to BowenMarmot and addendumE.
2019-06-25 17:01:41 +01:00
Roger A. Light
4f32e94104 Bump release date. 2019-06-18 12:44:37 +01:00
Roger A. Light
e642bee336 Update changelog 2019-06-18 11:21:15 +01:00
Roger A. Light
1d6aa9f69c Bump version and web pages. 2019-06-13 16:28:09 +01:00
Roger A. Light
c685b7ecf4 Fix mosquitto_pub -l not handling zero length input.
Closes #1302. Thanks to Marcus Watkins.
2019-06-06 23:21:07 +01:00
Roger A. Light
9dc319c183 Remove obsolete store_clean_interval from documentation. 2019-06-06 23:04:21 +01:00
Roger A. Light
1fa182d160 Fix incorrect shared subscription topic of '$shared.' 2019-06-06 23:03:18 +01:00
Roger A. Light
85388c01cc CLIENT_LDFLAGS now uses LDFLAGS.
Closes #1294. Thanks to Lucas Ramage.
2019-06-06 23:02:29 +01:00
Roger A. Light
6b6ea3de16 Remove old man page references.
Thanks to Karl Palsson.

Closes #1266.
2019-06-06 23:01:04 +01:00
Roger A. Light
3e858c19c1 Improve documentation around the upgrading of persistence files.
Thanks to jsaak.

Closes #1276.
2019-06-06 23:00:29 +01:00
Roger A. Light
6d71d4b5c4 Fix typo causing build error on Windows when building without TLS support.
Thanks to TimmvonderMehden.

Closes #1264.
2019-06-06 22:59:59 +01:00
Roger A. Light
289de1f8c8 Fix mosquitto_pub exiting with error code 0 when an error occurred.
Thanks to janniswarnat.

Closes #1285.
2019-06-06 22:59:01 +01:00
Roger A. Light
4d54a51c62 Stop some error messages being printed even when --quiet was used.
Thanks to Rob de Jonge.

Closes #1284.
2019-06-06 22:58:02 +01:00
Roger A. Light
587debc013 Fix incoming/outgoing quota problems for QoS>0. 2019-05-31 22:44:34 +01:00
Roger A. Light
7d954fa52e Fix mosquitto_pub -l not handling network failures.
Closes #1152. Thanks to Dustin Sallings.
2019-05-29 18:49:08 +01:00
Roger A. Light
1bafe0ee2e Fix double free on exit in mosquitto_pub.
Closes #1280. Thanks to Lucky Saini.
2019-05-29 18:42:38 +01:00
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.
2019-05-29 16:19:18 +01:00
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.
2019-05-29 16:07:45 +01:00
Roger A. Light
e51e40e95c Fix incorrect shared subscription topic of '$shared.' 2019-05-29 15:40:17 +01:00
Roger A. Light
1c0c6a40fc CLIENT_LDFLAGS now uses LDFLAGS.
Closes #1294. Thanks to Lucas Ramage.
2019-05-29 15:07:48 +01:00
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.
2019-05-29 11:47:18 +01:00
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.
2019-05-28 22:13:22 +01:00
Roger A. Light
00eee59ad9 Add 'extern "C"' on public headers.
mosquitto_broker.h and mosquitto_plugin.h

Thanks to Wolfgang Petroschka.

Closes #1290.
2019-05-23 11:03:09 +01:00
Roger A. Light
bd34d8c9cd Remove old man page references.
Thanks to Karl Palsson.

Closes #1266.
2019-05-22 09:45:02 +01:00
Roger A. Light
b4dfeb3767 Fix MQTT v5 clients not being able to specify a password without a username.
Thanks to Erik Moqvist.

Closes #1274.
2019-05-21 23:56:22 +01:00
Roger A. Light
46d5aa9682 Improve documentation around the upgrading of persistence files.
Thanks to jsaak.

Closes #1276.
2019-05-21 18:50:05 +01:00
Roger A. Light
3f8f4fc2c8 Fix typo causing build error on Windows when building without TLS support.
Thanks to TimmvonderMehden.

Closes #1264.
2019-05-21 18:42:22 +01:00
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.
2019-05-21 17:08:52 +01:00
Roger A. Light
29cf965b4f Fix mosquitto_pub exiting with error code 0 when an error occurred.
Thanks to janniswarnat.

Closes #1285.
2019-05-21 11:39:19 +01:00
Roger A. Light
7a33a129d6 Stop some error messages being printed even when --quiet was used.
Thanks to Rob de Jonge.

Closes #1284.
2019-05-21 11:23:00 +01:00
Roger A. Light
d05bd95881 Fix compilation problem related to getrandom() on non-glibc systems. 2019-05-16 22:12:18 +01:00
Roger A. Light
b1298dff54 Fix use of getrandom() for Linux and WITH_TLS=no. 2019-05-16 15:03:40 +01:00
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.
2019-05-16 14:03:39 +01:00
Roger A. Light
a47da31679 Update changelog, improve warning message from last commit. 2019-05-10 07:25:49 +01:00
Roger A. Light
cd3877e628 Fix detection of incoming v3.1/v3.1.1 bridges.
Closes #1263. Thanks to vrst37.
2019-05-08 11:53:51 +01:00
Roger A. Light
0e58a5e94e Bump version numbers, update webpage. 2019-04-30 14:33:32 +01:00
Roger A. Light
e742c1c2f1 Fix $SYS/broker/version being incorrectly expired after 60 seconds.
Close #1245. Thanks to Christoph Krey.
2019-04-30 13:25:56 +01:00
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.
2019-04-30 13:25:54 +01:00
Roger A. Light
a9f17cea95 Fix Will message not allowing user-property properties. 2019-04-30 13:25:27 +01:00
Roger A. Light
203949a512 Fix -L url parsing.
Closes #1248. Thanks to Andrew J Freyer.
2019-04-30 13:24:33 +01:00
Roger A. Light
dc4b823f92 Fix crash after client has been unable to connect to a broker
This is part of the cleanup routine when the client is already exiting.

Closes #1246. Thanks to Christoph Krey.
2019-04-30 13:23:25 +01:00
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.
2019-04-30 13:21:05 +01:00
Roger A. Light
42fb2f5538 Fix build for WITH_TLS=no.
Closes #1250. Thanks to bmparr.
2019-04-29 22:56:22 +01:00
Roger A. Light
35793ca1c4 Bump version number, update webpage. 2019-04-26 17:07:09 +01:00
Roger A. Light
439575475c Use CMAKE_INSTALL_* variables when installing in CMake.
Closes #1049. Thanks to Greg Troxel.
2019-04-26 17:07:05 +01:00
Roger A. Light
efa649f451 Don't call ldconfig in CMake scripts.
Closes #1048. Thanks to Greg Troxel.
2019-04-26 17:07:02 +01:00
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.
2019-04-26 17:06:54 +01:00
Roger A. Light
0d01e212ad Document bundled dependencies and how to disable.
Closes #1231. Thanks to Greg Troxel.
2019-04-26 16:25:43 +01:00
Roger A. Light
d6c7923d16 Add make check and document testing procedure.
Also support test target in cmake.
2019-04-26 16:25:35 +01:00
Roger A. Light
27b8bcf320 Document memory_limit option. 2019-04-26 11:48:29 +01:00
Roger A. Light
5c0c830229 Fix compilation on musl C systems due to missing sys/time.h header.
Thanks to maxice8.
2019-04-25 21:22:51 +01:00
Roger A. Light
449103e960 Merge remote-tracking branch 'refs/remotes/origin/fixes'
Conflicts:
	ChangeLog.txt
2019-04-17 17:51:34 +01:00
Roger A. Light
56757df512 Bump version and changelog details. 2019-04-17 17:44:02 +01:00
Roger A. Light
fb1979c0ea Fix build on SmartOS due to missing IPV6_V6ONLY.
Thanks to Matt Ingenthron.

Closes #1212.
2019-04-11 21:26:29 +01:00
Roger A. Light
cba3380b98 Fix mosquitto_sub encoding of special characters with %j format.
Thanks to Ben Barbour.

Closes #1220.
2019-04-11 21:05:47 +01:00
Roger A. Light
4995436b5a Add --repeat and --repeat-delay to mosquitto_pub. 2019-04-11 19:13:59 +01:00
Roger A. Light
dec769ce33 Client and doc ALPN additions
Add ALPN support for all clients, update documentation, and add to ChangeLog.
2019-04-11 11:52:34 +01:00
Roger A. Light
925debb8a5 Add mosquitto_rr, the "request-response" client. 2019-04-01 22:31:05 +01:00
Roger A. Light
1220ba4bfe Rejig OCSP code. 2019-03-26 22:13:42 +00:00
Roger A. Light
42732f4cca Fix mosquitto_passwd segfault on corrupt file.
Thanks to srasku-ge.

Closes #1207
2019-03-26 10:03:17 +00:00
Roger A. Light
320ddc1303 Merge branch 'master'
Conflicts:
	CMakeLists.txt
	ChangeLog.txt
	client/Makefile
	config.mk
	installer/mosquitto.nsi
	installer/mosquitto64.nsi
	lib/mosquitto.h
	lib/mqtt3_protocol.h
	lib/util_mosq.c
	set-version.sh
	snap/snapcraft.yaml
	src/bridge.c
	src/database.c
	src/handle_connack.c
	src/loop.c
	src/persist.c
	test/broker/Makefile
2019-03-16 10:05:38 +00:00
Roger A. Light
a29238fc87 Update changelog. 2019-03-13 08:15:38 +00:00
Roger A. Light
6a1ac70ee6 Disallow writing to $ topics where appropriate. 2019-03-03 22:00:30 +00:00
Roger A. Light
1d4bf55165 Tidy previous commit and add to changelog. 2019-03-02 22:52:23 +00:00
Roger A. Light
1ce1bce941 Add --remove-retained to mosquitto_sub
This can be used to clear retained messages on a broker.
2019-03-02 22:14:54 +00:00
Roger A. Light
ce31269e05 Update changelog, bump version, bump copyright year. 2019-02-28 16:56:15 +00:00
Roger A. Light
7207041428 Fix delayed bridge local subs causing missing messages.
Closes #1174. Thanks to beville.

Bug: https://github.com/eclipse/mosquitto/issues/1174
2019-02-28 15:38:15 +00:00
Roger A. Light
acf478eca2 Fix broken mosquitto_passwd on FreeBSD.
Closes #1032. Thanks to jkoopman, Joseph Benden and Ari Suutari.

Bug: https://github.com/eclipse/mosquitto/issues/1032
2019-02-28 14:26:14 +00:00
Roger A. Light
4490d06a63 Coverity fixes.
1398654, 1398656 - lib missing unlock on fatal protocol error
1398655 - broker potential double free on startup after fatal persist
          error.
2019-02-28 11:45:13 +00:00
Roger A. Light
463de0a2c1 Make error messages for missing config file clearer. 2019-02-28 11:13:47 +00:00
Roger A. Light
1924afe49e Add explicit support for TLS v1.3 and drop TLS v1.0. 2019-02-27 22:50:01 +00:00
Roger A. Light
130ddf47f7 Add dhparamfile option, to allow DH parameters to be loaded.
This is for Ephemeral DH support on listeners.
2019-02-27 22:26:40 +00:00
Roger A. Light
dfbd33e0f4 Update documentation for bridge backup, plus tweaks
Sets default to use the backoff mechanism.
2019-02-27 13:52:19 +00:00
Roger A. Light
e334aad853 Rewrite bind_interface docs, update changelog. 2019-02-27 10:07:14 +00:00
Roger A. Light
f4e24f9524 Use higher resolution timer for random client id generation. 2019-02-26 14:26:05 +00:00
Roger A. Light
5e8199323b Fix clients being disconnected when ACLs are in use.
This only affects the case where a client connects using a username, and
the anonymous ACL list is defined but specific user ACLs are not
defined.

Closes #1162. Thanks to quonb.
2019-02-14 17:46:01 +00:00
Roger A. Light
bb72cf9088 Bump version number, update webpage. 2019-02-13 23:49:17 +00:00
Roger A. Light
321e566af6 Fix unref'd messages being saved to the persistence file.
This was leaving dangling messages that were never freed.

Closes #389. Thanks to pjchx.
2019-02-13 12:08:05 +00:00
Roger A. Light
1a6c3f0c86 Improve documentation around the include_dir option.
Closes #1154. Thanks to Guzoft.
2019-02-13 10:08:44 +00:00
Roger A. Light
084062c85e Merge branch 'fixes' into mqtt5 2019-02-12 17:05:42 +00:00
Roger A. Light
9999faf9da Add rewritten build test script and remove some build warnings. 2019-02-12 13:24:54 +00:00
Roger A. Light
e72d1d6ff5 Fix mosquitto_topic_matches_sub() rc with sub=="topic/#abc".
This now returns MOSQ_ERR_INVAL as expected.
2019-02-12 11:26:23 +00:00
Roger A. Light
04e89450c0 Don't require C99 compiler. 2019-02-09 13:52:09 +00:00
Roger A. Light
715da28602 Fix include_dir not sorting config files before loading.
Thanks to momoskitto.
2019-02-08 23:52:11 +00:00
Roger A. Light
2e1c2c430f per_listener_settings true must come before other security settings.
Produce error if this is not the case. Closes #1164, thanks to
momoskitto.
2019-02-08 23:14:43 +00:00
Roger A. Light
9378016b19 Fix build failure when using WITH_ADNS=yes 2019-02-08 21:34:08 +00:00
Roger A. Light
1b5c900e77 Update CVE details and bump version number. 2019-02-08 13:01:07 +00:00
Roger A. Light
1c075988ca Log message for disconnecting a client with invalid UTF-8 topic.
Closes #1144. Thanks to Kris Mattheus.
2019-02-08 13:01:07 +00:00
Roger A. Light
f952ae3a67 Fixed durable clients being unable to receive messages when offline.
This occurred when per_listener_settings was set to true.

Closes #1081. Thanks to dwin-wangjt.
2019-02-08 13:01:07 +00:00
Roger A. Light
17b52bd5d1 Windows: Fix possible crash when client disconnects.
Closes #1137. Thanks to Kris Mattheus.
2019-02-08 13:01:07 +00:00
Roger A. Light
d6a690aa8d Fix Will not being sent for Websockets clients.
Closes #1143. Thanks to salcedo.
2019-02-08 13:01:07 +00:00
Roger A. Light
ab8b57ff54 Allow broker to always restart on Windows when using log_dest file.
Closes #1080. Thanks to lcouz.
2019-02-08 13:01:07 +00:00
Roger A. Light
29a1936c77 Fix spaces not being allowed in the bridge remote_username option.
Closes #1131. Thanks to beville.
2019-02-08 13:01:07 +00:00
Roger A. Light
ce1d0ae364 Man page can now be built on any system.
Closes #1139. Huge thanks to Chris Mayo.
2019-02-08 13:01:07 +00:00
Roger Light
c40957a7d8 Fix and tests for CVE-2018-12546. 2019-02-08 13:01:07 +00:00
Roger A. Light
d8505624d0 Fix and tests for security bug #541870. 2019-02-08 13:01:07 +00:00
Roger A. Light
36b5421c59 Fix and tests for security bug #543401. 2019-02-08 13:01:07 +00:00
Roger Light
5236295159 Handle mismatched handshakes properly.
For example, a QoS1 PUBLISH with QoS2 reply.
2019-02-08 13:01:07 +00:00
Roger A. Light
495e9647c2 Improve bridge remapping documentation. 2019-02-08 13:01:07 +00:00
Roger A. Light
ad42f449d8 Update changelog for previous PR.
Thanks to Matthias Stone.
2019-02-08 13:01:07 +00:00
Roger A. Light
e8320cbf19 Fix TLS connections not working over SOCKS.
Thanks to Mark Oeltjenbruns.
2019-02-08 13:01:07 +00:00
Roger A. Light
a2b78d87a6 Update changelog 2019-02-08 13:01:07 +00:00
Roger A. Light
be9c1071b0 Fix compilation when openssl deprecated APIs are not available.
Closes #1094. Thanks to Rosen Penev.
2019-02-08 13:01:07 +00:00
Roger A. Light
70c4097b6f Fix comparison of boolean values in CMake build.
Closes #1101. Thanks to Mojca Miklavec and Andrew L. Moore.
2019-02-08 13:01:07 +00:00
Roger A. Light
4a2e569171 -V now accepts 5, 311, 31, as well as mqttv5` etc. 2019-01-09 18:06:20 +00:00
Roger A. Light
2f54b16544 Fix mosquitto_pub not always sending everything with -l and QoS>0. 2019-01-08 14:19:50 +00:00
Roger A. Light
19fbbd8726 Update details of CVE-2018-20145. 2018-12-20 18:45:01 +00:00
Roger A. Light
fcf4cd0b27 Merge branch 'master' into mqtt5 2018-12-19 14:11:11 +00:00
Roger A. Light
a8ca5c83af Bump version. 2018-12-11 11:13:09 +00:00
Roger A. Light
89f3d7bb3f Don't print connect/disconnect messages when connection_messages false.
Closes #772. Closes #613. Closes #537.

Thanks to Christopher Maynard, Brandon Arrendondo, and qubeck.
2018-12-11 10:55:39 +00:00
Roger A. Light
a00dd29af8 Fix building where TLS-PSK is not available.
Closes #68.
2018-12-11 10:55:31 +00:00
Roger A. Light
9097577b49 Fix acl_file being ignore for default listener if with per_listener_settings
Close #1073. Thanks to Jef Driesen.

Bug: https://github.com/eclipse/mosquitto/issues/1073
2018-12-09 21:23:46 +00:00
Roger A. Light
73c46174f8 Don't call on_disconnect() twice if keepalive tests fail.
Closes #1067. Thanks to xingchen02.

Bug: https://github.com/eclipse/mosquitto/issues/1067
2018-12-06 10:45:57 +00:00
Roger A. Light
6ef2c79e9a Add max_keepalive, for limiting keepalives of MQTT v5 clients. 2018-12-06 08:49:02 +00:00
Roger A. Light
48c2217015 auto_id_prefix now defaults to 'auto-'. 2018-12-05 17:17:35 +00:00
Roger A. Light
1d3949bce0 Improve broker generated client ids for the non-Linux case.
Removes libuuid dependency.
2018-12-05 16:39:45 +00:00
Roger A. Light
3a871828ac Print message on error when installing as a Windows service. 2018-12-05 11:25:41 +00:00
Roger A. Light
c9ed2708f6 Don't reload auth_opt_ options on reload.
This matches the behaviour of the other plugin options.

Closes #1068. Thanks to Jason McFadyen.

Bug: https://github.com/eclipse/mosquitto/issues/1068
2018-12-04 20:51:25 +00:00
Roger A. Light
464b12f3d6 Fix outgoing retained messages not being sent by bridges.
This now happens on initial connection, after CONNACK is processed,
before it was happening (and being dropped) before the connection was
made.

Closes #1040. Thanks to giover.

Bug: https://github.com/eclipse/mosquitto/issues/1040
2018-12-04 20:45:15 +00:00
Roger A. Light
5d02f58151 Fix reconnect delay backoff behaviour.
Closes #1027. Thanks to Harm Verhagen.

Bug: https://github.com/eclipse/mosquitto/issues/1027
2018-12-04 17:19:31 +00:00
Roger A. Light
e169f1c7c2 When using ADNS, don't ask for all network protocols when connecting.
This can lead to confusing "Protocol not supported" errors if the
network is down, because UDP sockets are provided.

Thanks to jsaak.

Closes #1062.

Bug: https://github.com/eclipse/mosquitto/issues/1062
2018-12-04 12:39:00 +00:00
Roger A. Light
d29dac087d Add socket_domain option. 2018-12-04 11:48:29 +00:00
Roger A. Light
34293d07c1 Always print leading zeros in mosquitto_sub when output format is hex.
Closes #1066.

Thanks to skiizo.

Bug: https://github.com/eclipse/mosquitto/issues/1066
2018-12-04 09:24:04 +00:00
Roger A. Light
b54e379fba Fix websockets listeners not verifying client certs.
When using a TLS enabled websockets listener with "require_certificate"
enabled, the mosquitto broker does not correctly verify client certificates.
This is now fixed. All other security measures operate as expected, and in
particular non-websockets listeners are not affected by this. Closes #996.

Thanks to creising.
2018-11-08 12:10:28 +00:00
Roger A. Light
71b8c4d892 Fix TLS connections when using an external event loop.
Affects the use of mosquitto_loop_read() and mosquitto_write().
Closes #990.
2018-11-07 21:08:10 +00:00
Roger A. Light
b803b40a22 Update changelog. 2018-11-07 18:32:17 +00:00
Roger A. Light
34c752a0d0 Give better error message if a client sends a password without a username.
Closes #1015. Thanks to TabascoEye.
2018-11-07 17:29:39 +00:00
Roger A. Light
9f7577aab6 $SYS/broker/clients/disconnected should never be negative.
Closes #287. Thanks to Lovisa Johansson.

Bug: https://github.com/eclipse/mosquitto/issues/287
2018-11-07 17:23:43 +00:00
Roger A. Light
d7bcec4878 Don't disconnect clients when a plugin denies SUBSCRIBE.
Thanks to Ibrahim Koujar.

Bug: https://github.com/eclipse/mosquitto/issues/1016
2018-11-07 10:06:32 +00:00
Roger A. Light
eff8fab1b4 Only process network errors for clients that have nothing to read.
Closes #7.
2018-11-06 23:02:33 +00:00
majekw
7f1419e4de Fix mosquitto_pub -l if compiled using cmake.
Since dde005ef92 mosquito_pub is throwing error
that 'threading support has not been compiled' when compiled using cmake.
It looks like WITH_THREADING flag is not set at top level Makefile and used
only in lib/ directory, so library is correctly compiled with threading.
But for client this flag is undefined, so it gives error on '-l' option.

This commit moves part related to WITH_THREADING flag out of lib/CMakeLists.txt
to top levele CMakeLists.txt, so it could be accessible to all subdirectories.

Signed-off-by: Marek Wodzinski <majek@w7i.pl>
2018-10-23 18:56:00 +01:00
Roger A. Light
0a9ee5b4cf Fix memory leak when reconnecting with TLS errors.
Fix memory leak that occurred if mosquitto_reconnect() was used when TLS
errors were present.

Closes #592. Thanks to smartdabao and aaronovz1.
2018-10-23 10:46:55 +01:00
Roger A. Light
1867f30785 Merge branch 'master'
Conflicts:
	ChangeLog.txt
2018-10-02 08:31:54 +01:00
Roger A. Light
0e76bed50e Add -E option to mosquitto_sub.
This causes the client to exit immediately after its subscriptions are
acknowledged by the broker, and can be used to create a durable client
session without requiring messages to be delivered.

Closes #952.
2018-09-27 22:21:42 +01:00
Roger A. Light
8b66a323cd Add mosquitto_subscribe_multiple()
For sending subscriptions to multiple topics in one command.
2018-09-27 22:06:54 +01:00
Roger A. Light
c78003cacf Bump version number, add CVE details. 2018-09-25 16:26:28 +01:00
Roger A. Light
588d39efdc Fix Windows version not starting if include_dir did not contain any files.
Closes #566.

Thanks to marleau.
2018-09-25 16:14:57 +01:00
Roger A. Light
d9fc9cd0ae Add allow_zero_length_clientid, auto_id_prefix documentation.
Closes #600.
2018-09-25 14:38:54 +01:00
Roger A. Light
f9c9f3d396 Fix incorrect hash usage with duplicate clients.
Fix duplicate clients being added to by_id hash before the old client
was removed.

Closes #645.
2018-09-25 14:25:54 +01:00
Roger A. Light
008d424a33 Minor documentation fix. Closes #520. 2018-09-25 14:25:54 +01:00
Roger A. Light
7b1892caef Fix retained msgs not sent by bridges.
This occurred when a bridge connected for the first time and so made a
local subscription for outgoing topics.

Closes #701.
2018-09-25 14:25:54 +01:00
Roger A. Light
59bd07627d Various build improvements to help packaging. 2018-09-25 14:25:54 +01:00
Roger A. Light
7ca3a24686 Remove requirement to use user root in snap package config files. 2018-09-20 12:05:02 +01:00
Roger A. Light
0e16a248f2 Elevate log level to warning for situation when socket limit is hit. 2018-09-20 12:00:51 +01:00
Roger A. Light
3f87232065 Bump version number. 2018-09-19 18:09:43 +01:00
Roger A. Light
55ca61f14e Fix segfault on HUP when bridges and security options are configured.
Closes #849. Closes #965. Thanks to Wolfgand Hottgenroth and Dustin Sallings.
2018-09-19 17:52:23 +01:00
Roger A. Light
2b4ba10b3d Fix "round_robin false" behaviour.
Closes #481.
2018-09-19 17:30:38 +01:00
Roger A. Light
1e47ee4cad Fix for bridge connections when using WITH_ADNS=yes. 2018-09-19 12:55:08 +01:00
Roger A. Light
888ca48823 Changelog entry for #932. 2018-09-18 15:03:16 +01:00
Roger A. Light
ae45bd3d40 Update changelog and fixes to #927 PR. 2018-09-18 14:57:13 +01:00