Roger A. Light
d8cc5bc4fe
Merge branch 'fixes' of github.com:eclipse/mosquitto into fixes
8 years ago
Roger A. Light
0ba0bc434e
Use constant time memcmp for password checks.
8 years ago
Fredrik Fornwall
366194cde4
Replace getdtablesize() with sysconf(_SC_OPEN_MAX)
...
From http://man7.org/linux/man-pages/man3/getdtablesize.3.html :
"It is not specified in POSIX.1; portable applications should employ
sysconf(_SC_OPEN_MAX) instead of this call."
Specifically this fixes a build failure on Android which does not
have getdtablesize().
Signed-off-by: Fredrik Fornwall <fredrik@fornwall.net>
8 years ago
Roger A. Light
2a50b2e9bd
Fix regression from 1.4.13 where persistence data was not being saved.
8 years ago
Roger A. Light
8de5ed4464
Remove "error in poll" messages.
8 years ago
Roger A. Light
cd17ca45cd
[462] Relax CVE-2017-7650 checks.
...
Checks for '/' are no longer made, this character is a much lower risk
and is widely used in usernames.
Bug: https://github.com/eclipse/mosquitto/issues/462
8 years ago
Roger A. Light
c3823c0a81
[462] Add auth_plugin_deny_special_chars option.
...
Auth plugins can be configured to disable the check for +# in
usernames/client ids with the auth_plugin_deny_special_chars option.
Thanks to wiebeytec.
Bug: https://github.com/eclipse/mosquitto/issues/462
8 years ago
Roger A. Light
5246a76f87
[477] Send will messages for connected clients when broker stops.
...
Thanks to mikeS7.
Bug: https://github.com/eclipse/mosquitto/issues/477
8 years ago
Roger A. Light
96db6d6644
Fix CONNECT check for reserved=0, as per MQTT v3.1.1 check MQTT-3.1.2-3.
8 years ago
Roger A. Light
6e7d02ba16
Fix for CVE-2017-9868 for Windows.
8 years ago
Pierre Fersing
408972ddc1
Fix two issues with Websocket ( #472 )
...
* Websocket were always marked as "want_write" (even if they only
want to read, or worse want nothing).
* Websocket FD was read twice in some case (when socket recv queue was
larger that size read by libwebsocket)
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
8 years ago
Roger A. Light
09cb1b61c8
[468] Set persistence file to only be readable by owner.
...
Not implemented on Windows.
Thanks to Moshe Zioni.
Bug: https://github.com/eclipse/mosquitto/issues/468
8 years ago
Roger A. Light
ab45f86d74
Prevent out of bounds array access.
8 years ago
Roger A. Light
c78678607d
[427] Fix large retained messages over websockets.
...
Thanks to Brian Block.
Bug: https://github.com/eclipse/mosquitto/issues/427
8 years ago
Roger A. Light
8f59d5ad28
Remove unused vars and reset pollfd_index on disconnect.
8 years ago
Roger A. Light
c07ba2a3da
Experimental fix for poor websockets performance.
8 years ago
Jan Lukavsky
621f18d696
#419 Broker sometimes kills connection to client
...
Signed-off-by: Jan Lukavsky <je.ik@seznam.cz>
8 years ago
Roger A. Light
9af3c6958f
Fix for CVE-2017-7650.
8 years ago
Roger A. Light
ca8a507607
[446] Don't segfault on duplicate bridge names.
...
Thanks to Tifaifai Maupiti.
Bug: https://github.com/eclipse/mosquitto/issues/446
9 years ago
Riccardo Magliocchetti
059ba5f00b
Fix use of unitialized memory in gets_quiet
...
Spotted by cppcheck
Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
9 years ago
YuLun Shih
97572610c0
Fix bridge->restart_t won't be reset
...
Signed-off-by: YuLun Shih <shih@yulun.me>
9 years ago
Roger A. Light
a93a0c9bb1
[424]
...
Fix mosquitto.db from becoming corrupted due to client messages being
persisted with no stored message.
Thanks to codami.
Bug: https://github.com/eclipse/mosquitto/issues/424
9 years ago
Roger A. Light
ebad302119
[379] Improve mosquitto_passwd error messages.
...
Thanks to Jaimyn Mayer. Closes #379 .
Bug: https://github.com/eclipse/mosquitto/issues/379
9 years ago
Roger A. Light
565c9c3432
[344] Fix non-async case.
9 years ago
Roger A. Light
f0485d1398
[344] Don't compile in async dns support by default for makefiles.
9 years ago
Roger A. Light
fb824e7f1e
[344] Detect libanl in cmake.
9 years ago
Roger A. Light
3d40ffe18b
[344] Only do async dns on glibc.
9 years ago
Roger A. Light
f464970fcf
[344] Fix leaks and incorrect connect call.
9 years ago
Roger A. Light
ef7a230365
Start of fix for [344].
9 years ago
Fredrik Fornwall
23b0891048
Include <syslog.h> instead of <sys/syslog.h>
...
Using the standard <syslog.h> header instead of <sys/syslog.h> makes it
consistent with other source files and fixes compilation on Android.
Signed-off-by: Fredrik Fornwall <fredrik@fornwall.net>
9 years ago
Fredrik Fornwall
532273250c
Check for rt and pthread libraries before linking
...
This fixes building on Android which does not have separate librt
or libpthread libraries.
Signed-off-by: Fredrik Fornwall <fredrik@fornwall.net>
9 years ago
Roger A. Light
9b05b12039
More file closing fixes.
9 years ago
Roger A. Light
a2a2099fa1
Fix error message when websockets http_dir directory does not exist.
9 years ago
Roger A. Light
8171a975ae
[354] Close http files even on bad clients.
...
Thanks to jbwdevries.
Bug: https://github.com/eclipse/mosquitto/issues/354
9 years ago
Roger A. Light
7f66bf1f65
[316] Don't error on zero length persistence files.
...
Closes #316 .
Bug: https://github.com/eclipse/mosquitto/issues/316
9 years ago
Roger A. Light
1abd089afb
[295] Usage should say we support 3.1.1 as well as 3.1.
...
Closes #295 .
Bug: https://github.com/eclipse/mosquitto/issues/295
9 years ago
tucic
f272e2e047
Maximum connections for websockets listener ( #271 )
...
Check current number of connections before accepting new websockets clients.
Signed-off-by: tucic <tucic.milan@gmail.com>
9 years ago
Roger A. Light
762126064c
[259] Fix crash when "lazy" type bridge attempts to reconnect.
...
Thanks to hakofugu41.
Bug: https://github.com/eclipse/mosquitto/issues/259
9 years ago
Roger A. Light
7ace6c9e7e
Merge branch 'master' into fixes
9 years ago
Karl Palsson
03d4b8c270
websockets: fix compatibility with older lws versions ( #260 )
...
In 1.3, 1.4 and 1.5, the function was "libwebsockets_get_protocol" not
"libwebsocket_get_protocol" While the #define name doesn't matter on
newer libwebsockets, where it redirects to lws_get_protocol, the naming
is critical for older versions.
Fixes: 477cd3e399
(Fix missing context->listener for websocket client)
Signed-off-by: Karl Palsson <karlp@etactica.com>
9 years ago
Roger A. Light
ee1fd1718b
Merge branch 'fixes'
9 years ago
kcallin
7ba3f3d33b
[189] Mosquitto database corrupted on power-loss. ( #206 )
...
Mosquitto database writes are not atomic and if power is lost during
a write the file will be permanently lost. This commit makes writes as
atomic as possible.
Signed-off-by: Keegan Callin <kc@kcallin.net>
Bug: https://github.com/eclipse/mosquitto/issues/189
9 years ago
Roger A. Light
ba2de88790
Display error if broker unable to open the log file.
...
Thanks to Matthew Treinish.
Bug: https://github.com/eclipse/mosquitto/issues/234
9 years ago
Pierre Fersing
477cd3e399
Fix missing context->listener for websocket client ( #239 )
...
The context associated with websocket client didn't had listener
filled, which caused use_username_as_clientid to be ignored.
Signed-off-by: Pierre Fersing <pierre.fersing@bleemeo.com>
9 years ago
Roger A. Light
00aa181749
[244] Add note on compiling auth plugin on OSX.
...
Closes #244 .
Bug: https://github.com/eclipse/mosquitto/issues/244
9 years ago
Roger A. Light
bcfa29cbd1
[222] Fix will retained flag handling on Windows.
...
Thanks to codami.
Bug: https://github.com/eclipse/mosquitto/issues/222
9 years ago
tucic
50b26347d4
Writing least significant byte of subscription QoS ( #210 )
...
Signed-off-by: Milan Tucic <tucic.milan@gmail.com>
9 years ago
Roger A. Light
eaef3db142
O_DIRECTORY not supported everywhere, use O_RDONLY.
9 years ago
Roger A. Light
84df2bb923
[189] Call fsync after persisting data.
...
To ensure it is correctly written. Closes #189 .
Thanks to thanhvtruong.
Bug: https://github.com/eclipse/mosquitto/issues/189
9 years ago
Roger A. Light
fff741613e
Support for openssl 1.1.0.
9 years ago