Roger A. Light
00d951e6d6
Allow plugins to call mosquitto_log_printf() (Linux only at the moment).
11 years ago
Roger A. Light
fc1e514ad4
Add log_facility for non-Windows OSs.
11 years ago
Roger A. Light
0a86aee5fb
Authentication plugin acl_check function is passed local_username for local bridges.
11 years ago
Roger A. Light
ab49b96db1
Windows related fixes.
11 years ago
Roger A. Light
6524115f45
Error if websockets not available.
11 years ago
Roger A. Light
052c2d7766
Fix for Windows.
11 years ago
Roger A. Light
041f60c03e
Make bridge connections non-blocking for TLS connections.
11 years ago
Roger A. Light
c92e2f5581
Declare variables before code.
11 years ago
Roger A. Light
a1f18323d1
Make bridge connections non-blocking for non-TLS connections.
11 years ago
Roger A. Light
4ff6a6aa49
Remove duplicate strlen check.
11 years ago
Roger A. Light
66443c14bd
Assign to NULL to prevent double free later.
11 years ago
Roger A. Light
7a2dd634cb
Protect against possible NULL dereference after unsubscribing.
11 years ago
Roger A. Light
372b64a290
More "client has disconnected but is not freed" protections.
11 years ago
Roger A. Light
c8dffcbfbb
Fixes for clientid stealing situation.
11 years ago
Roger A. Light
02be4965ea
Don't rearrange leaves here until we are sure we have all the memory allocated.
11 years ago
Roger A. Light
eb01459571
Protect against client->id NULL dereference.
11 years ago
Roger A. Light
065c6356d4
Don't derefence NULLs.
11 years ago
Roger A. Light
7746427b07
Record client subs correctly.
11 years ago
Roger A. Light
43b1ea8050
Memory leak and id stealing fixes.
11 years ago
Roger A. Light
e3bf10cd9a
Change the way that new clients with match client ids are dealt with.
...
This change means that the connection isn't swapped from new context to
old, which makes dealing with websockets lots easier. It does require
that clients storing a list of their subscriptons.
11 years ago
Roger A. Light
d2dbe16d68
Client structs store sub information to make _subs_clean_session more efficient.
11 years ago
Roger A. Light
070d783c9f
Merge 1.3.2-1.3.5 into 1.4.
11 years ago
Roger A. Light
1a47f86648
Typo fix.
11 years ago
Roger A. Light
8cb9b195e5
When using -v and the broker receives a SIGHUP, verbose logging was being disabled. This has been fixed.
11 years ago
Roger A. Light
bad7ec75f0
Temporarily disable ACL checks on subscriptions when using MQTT v3.1.1.
...
This is due to the complexity of checking wildcard ACLs against wildcard
subscriptions. This does not have a negative impact on security because
checks are still made before a message is sent to a client. Fixes bug
Thanks to Jan-Piet Mens and Christoph Krey.
11 years ago
Roger A. Light
429c892557
Fix saving persistent database on Windows.
...
Thanks to Daniel Degasperi.
11 years ago
Roger A. Light
43556537e3
Don't ask for client cert when require_certificate is false.
11 years ago
Roger A. Light
4a19d9ae3a
Fix possible memory leak when using a topic that has a leading slash.
...
Fixes bug #1360986 .
11 years ago
Roger A. Light
950c4ed9c6
Check return value of fseek for errors.
11 years ago
Roger A. Light
84214bcd99
Simplify appending of topics when tokenising. Helps remove dead code.
11 years ago
Roger A. Light
aa2e6a8d29
Fix possible NULL derefence.
11 years ago
Roger A. Light
db9d6b9f3d
Fix potential memory leak from context->current_out_packet.
11 years ago
Roger A. Light
154b2fc264
Must remove memory reference here.
11 years ago
Roger A. Light
dcd469c177
Use own linked list for storing disused contexts for freeing.
...
Seemed to be a problem with getting it to work under a hash and there
isn't really any need for a hash.
11 years ago
Roger A. Light
2a922e9f06
Fix verbose logging on reload.
11 years ago
Roger A. Light
e561b5ea08
Windows fix.
11 years ago
Roger A. Light
7fb629d818
Fix potential leak.
11 years ago
Roger A. Light
58c857c473
Fix for windows.
11 years ago
Roger A. Light
58a7565a2b
Check http request directories on Windows.
11 years ago
Roger A. Light
99779c03c7
Fix reporting of local bridge status.
11 years ago
Roger A. Light
65526d2746
No need to call lws_partial_buffered() here. It is never set at the start of a callback.
11 years ago
Roger A. Light
f61a8cbf74
Get address for websockets clients.
11 years ago
Roger A. Light
91fa1c9625
Disable ipv6 websockets.
11 years ago
Roger A. Light
2bf7a8fb13
Prevent NULL derefencing and accessing of freed memory.
11 years ago
Roger A. Light
3d58f5ed82
Some minor memory leak fixes.
11 years ago
Roger A. Light
1fb5a3edc6
Use hash counts to calculate numbers of clients.
11 years ago
Roger A. Light
3eead8c507
retained_ and subscription_count only used with sys tree.
11 years ago
Roger A. Light
7b1ee68ef1
Remove compilation warnings for various configurations.
11 years ago
Roger A. Light
dd36c4b273
Don't attempt to find real path of NULL.
11 years ago
Roger A. Light
9286da192e
Fix unused var.
11 years ago
Roger A. Light
f9951595c8
Fix missing headers.
11 years ago
Roger A. Light
06bec1083d
Expose mosquitto_pub_topic_check() and mosquitto_sub_topic_check().
11 years ago
Roger A. Light
3c5ca95c81
File serving from http on *nix.
11 years ago
Roger A. Light
b84ca80052
Skeleton callback_http() function.
11 years ago
Roger A. Light
f500ff78b8
no_buffer_all_partial_tx not in latest LWS.
11 years ago
Roger A. Light
c4e7233159
Add http_dir option (not yet used).
11 years ago
Roger A. Light
d75473ec63
Fix possible memory leaks.
...
Thanks to Johann Haarhoff.
11 years ago
Roger A. Light
b01b0b581f
Produce error if unable to create WS listener.
11 years ago
Roger A. Light
ef573448f4
Another bridge notification fix.
11 years ago
Roger A. Light
1fdc4ceee6
Check expiration every hour regardless of the duration.
11 years ago
Roger A. Light
76724c790e
Disconnect expired clients correctly.
11 years ago
Roger A. Light
580cd722dc
Remote/local bridge fixes.
11 years ago
Roger A. Light
b937a043e7
Rename remote bridge identifiers to remote_.
11 years ago
Roger A. Light
950db12c74
Don't free local bridge clients on disconnect.
11 years ago
Roger A. Light
56ff849c65
Backout changeset c7589b77956c5bac076ae23905fbfc8902d69dc5.
11 years ago
Roger A. Light
e6239e1b3c
Backout changeset 76f3a755c6548690f69f2256c8b83c7a0f0f9a95.
11 years ago
Roger A. Light
d8a3ab7d56
Don't ask client for certificate when require_certificate is false.
...
Thanks to Jan-Piet Mens.
11 years ago
Roger A. Light
8e7736b78e
Fix incorrect handling of anonymous bridges on the local broker.
...
Thanks to Jan-Piet Mens.
11 years ago
Roger A. Light
6af0c236e8
Each listener requires its own copy of the protocols struct.
11 years ago
Roger A. Light
77999c7fd0
Fix incorrect commit.
11 years ago
Roger A. Light
e5aa843ec7
Don't allow access to clients when authenticating if a security plugin returns an application error. Fixes bug #1340782 .
...
Thanks to Charlie Davis.
11 years ago
Roger A. Light
8efb4f9334
Fix bug #1324411
...
Thanks to chenzhenianqing.
11 years ago
Roger A. Light
885d8ca5db
When a durable client reconnects, its queued messages are now checked against ACLs in case of a change in username/ACL state since it last connected.
...
Thanks to "web1".
11 years ago
Roger A. Light
45fa820989
Anonymous clients are no longer accidently disconnected from the broker after a SIGHUP.
11 years ago
Roger A. Light
8b2effcc36
Don't check for POLLERR or POLLNVAL.
...
Errors will be caught when trying to read anyway, and doing these checks
here means that sockets may be closed prematurely.
11 years ago
Roger A. Light
0ff0cfb3d3
Need to include bridges here.
11 years ago
Roger A. Light
9bb336bbf3
Use do_disconnect() for websockets.
11 years ago
Roger A. Light
95a4ec431d
Don't try to disconnect twice.
11 years ago
Roger A. Light
bb1a69b7d7
Disconnect clients consistently.
11 years ago
Roger A. Light
22094aa00d
Memory checks.
11 years ago
Roger A. Light
3fd1dc477f
Fix defects identified by Coverity.
11 years ago
Roger A. Light
5ac576f2ab
Request write callback if there is still more to send.
11 years ago
Roger A. Light
405b7f0aab
Don't free here, leads to potential double free.
11 years ago
Roger A. Light
0856e9519d
Need to assign ws_context here.
11 years ago
Roger A. Light
399453837d
Log websockets listeners being opened.
11 years ago
Roger A. Light
13f94f3511
More reconnect fixes.
11 years ago
Roger A. Light
2b300b718b
Fix double free for websockets with bad auth.
11 years ago
Roger A. Light
0fb064e0b4
Fix clean session for reconnecting clients.
11 years ago
Roger A. Light
fe5dba5887
Add use_username_as_clientid.
11 years ago
Roger A. Light
864f1f0d23
Initialise variable.
11 years ago
Roger A. Light
84619c296d
Fix building for WITH_BRIDGE=no.
11 years ago
Roger A. Light
d75903b0ae
Fix reconnect support for websockets.
11 years ago
Roger A. Light
d60e44ec1b
Handle reconnects for websockets.
11 years ago
Roger A. Light
542ebb2480
Free peer certificate after use.
11 years ago
Roger A. Light
bdb3e74100
More memory fixes.
11 years ago
Roger A. Light
15efd2d072
Various memory fixes.
11 years ago
Roger A. Light
ff5fd26e13
Free base64 memory properly.
11 years ago
Roger A. Light
7f18ced0b4
Close websockets connection if we are set to disconnecting.
11 years ago
Roger A. Light
482d604598
Only remove from hash if a valid socket (i.e. if present)
11 years ago
Roger A. Light
3577dbf332
Add sock hash earlier to avoid crashes.
11 years ago
Roger A. Light
0fc0e13a8f
Can't access mosq after free.
11 years ago
Roger A. Light
19056e6d4c
Removed $SYS/broker/changeset.
11 years ago
Roger A. Light
480d8a08d0
Count disconnected clients on persistence restore.
11 years ago
Roger A. Light
749ea76678
Typo.
11 years ago
Roger A. Light
cc33a6e5af
Do proper cleanup, including websockets.
11 years ago
Roger A. Light
764b7e0a91
Use hash functions to store client data.
11 years ago
Roger A. Light
7911db1a1e
Simplify.
11 years ago
Roger A. Light
bd2aa2f426
Add batch mode to mosquitto_passwd.
11 years ago
Roger A. Light
9a9dba6cd5
Support for mqttv3.1 subprotocol string.
11 years ago
Roger A. Light
29e65e4965
Anonymous clients are no longer accidently disconnected from the broker after a SIGHUP.
11 years ago
Roger A. Light
4025fad5aa
libuuid is used to generate client ids, where it is available, when an MQTT v3.1.1 client connects with a zero length client id.
11 years ago
Roger A. Light
731391bcb3
Separate function for generating a random client id.
11 years ago
Roger A. Light
0461c08fdf
use_identity_as_username now no longer affects non-TLS listeners.
11 years ago
Roger A. Light
af49fc556a
When a durable client reconnects, its queued messages are now checked against ACLs in case of a change in username/ACL state since it last connected.
...
Thanks to "web1".
11 years ago
Roger A. Light
930b917217
Save disconnect_t for connected clients when the broker exits.
11 years ago
Roger A. Light
11631d8d92
Add local_clientid for bridges.
11 years ago
Roger A. Light
aca67a2170
Better function names.
11 years ago
Roger A. Light
e221b37658
Add stats mode for db_dump.
11 years ago
Roger A. Light
7b62bfd7da
Use time() for disconnect_t, CLOCK_MONOTONIC isn't useful over reboots.
11 years ago
Roger A. Light
1ef8575a35
Reset disconnect_t on client reconnect.
11 years ago
Roger A. Light
ad43754b62
Log username in single quotes.
11 years ago
Roger A. Light
4430228855
Be consistent about removing listener counts on socket close.
11 years ago
Roger A. Light
7cef936ba6
Logging fixes.
11 years ago
Roger A. Light
c8a0786dea
TLS websockets support.
11 years ago
Roger A. Light
6a7f77d2a8
More intelligent client counting.
11 years ago
Roger A. Light
0d80800786
Don't refuse clients with will topic that isn't allowed by acl.
11 years ago
Roger A. Light
ef4b7a52a0
Fix missing headers for WITH_TLS=no.
11 years ago
Roger A. Light
fd7d5ebbb9
Change $SYS/broker/clients/[in]active -> $SYS/broker/clients/[dis]connected
11 years ago
Roger A. Light
e4ddc31295
Fix for MQTT-3.8.4-3.
12 years ago
Roger A. Light
85af9bdd9a
Simplify.
12 years ago
Roger A. Light
87579e0cac
Remove STRICT_PROTOCOL #ifdefs.
12 years ago
Roger A. Light
1984e2e37d
v3.1.1 requires websockets protocol to be mqtt.
12 years ago
Roger A. Light
c13f4c7931
Close config files on error.
12 years ago
Roger A. Light
5da25ae5d9
Add support for "session present" in CONNACK messages for MQTT v3.1.1.
12 years ago
Roger A. Light
0224db85c4
Fix bug #1324411
12 years ago
Roger A. Light
6cc3e7999e
Tidy up.
12 years ago
Roger A. Light
859224224a
Fix potential memory leak.
12 years ago
Roger A. Light
6a03972507
Default to websockets off for cmake.
12 years ago
Roger A. Light
be0cfff969
Fix possible leaks.
12 years ago
Roger A. Light
7d197563bc
Fix for non-lws compilation.
12 years ago
Roger A. Light
1148cdae23
Loop fix.
12 years ago
Roger A. Light
063928bbfe
Merge websockets -> 1.4.
12 years ago
Roger A. Light
e8f07d706d
Per-listener processing of websockets contexts.
12 years ago
Roger A. Light
2db22f3abd
Merge 1.3.2 branch in 1.4 branch.
12 years ago
Roger A. Light
330a7a882e
Add CROSS_COMPILE to Makefiles.
12 years ago
Roger A. Light
58891769c1
Quicker to return here.
12 years ago
Roger A. Light
5ca13a82f9
No need for pthreads in broker code.
12 years ago
Roger A. Light
175299c872
Guard for incomplete code when using websockets.
12 years ago
Roger A. Light
50f9b6bd7a
Enable partial writes for mqtt websockets.
12 years ago
Roger A. Light
7316742cf4
Config support for websockets.
12 years ago
Roger A. Light
9ea161f90e
Return success on libwebsocket_write==0.
12 years ago
Roger A. Light
06625420e2
Fix for local_username/password bridge checks.
12 years ago
Roger A. Light
7b5b5cf43e
Add local_username, local_password for bridge connections to authenticate to the local broker.
12 years ago
Roger A. Light
dc71f9157d
Use $(STRIP) for stripping binaries when installing, to allow easier cross compilation.
...
Thanks to Frank Pagliughi.
12 years ago
Bart Van Der Meerssche
59eb5a65bf
include a switch to disable elliptic curve support in the broker
...
Change-Id: Ic874a92b79b32b4ebd2b8130fefe2b31fddd43b6
Signed-off-by: Bart Van Der Meerssche <bart@flukso.net>
11 years ago
Roger A. Light
fb7dd42e5d
Support for ECDHE-ECDSA family ciphers.
11 years ago
Roger A. Light
40818619fd
Deduplicate tls context code.
11 years ago
Roger A. Light
ae6baad2fa
Default TLS mode now accepts TLS v1.2, v1.1 and v1.0.
12 years ago
Roger Light
e5cc63a89b
Fix subscriptions sometimes being deleted.
...
Fix subscriptions being deleted when clients subscribed to a topic
beginning with a $ but that is not $SYS.
Thanks to David Woodward.
12 years ago
Roger Light
ab15557931
Fix possible crash when using pattern ACLs.
...
Crash may occur for ACLs that do not include a %u and clients that
connect without a username.
Thanks to Karl Palsson.
12 years ago
Roger Light
b8e34b0b05
Ensure that bridges verify certificates by default when using TLS.
...
Thanks to Stefan Borsje.
12 years ago
Roger A. Light
62171a381e
Fix for local_username/password bridge checks.
12 years ago
Roger A. Light
968004d9d8
Add local_username, local_password for bridge connections to authenticate to the local broker.
12 years ago
Roger Light
0364bd1be7
Initial contribution.
12 years ago
Roger A. Light
4bb7a45b71
Crude, hard coded websockets support. No TLS.
12 years ago