Commit Graph

69 Commits (48d731ecb5676e6bca48cc419f6c194c5fd42200)

Author SHA1 Message Date
Roger A. Light 48d731ecb5 Use better random numbers for everything, where possible. 7 years ago
Roger A. Light b2c0c3d573 Handle DISCONNECT with will. 7 years ago
Roger A. Light c506c8335b Will delay tests and implementation. 7 years ago
Roger A. Light b0c60fb6e1 Separate will reading code. 7 years ago
Roger A. Light 084062c85e Merge branch 'fixes' into mqtt5 7 years ago
Roger Light c40957a7d8 Fix and tests for CVE-2018-12546. 7 years ago
Roger A. Light ca3782b38d Test and fixes for will message expiry interval. 7 years ago
Roger Light 8513af4da5 Tests and fixes for shortened DISCONNECT packets. 7 years ago
Roger A. Light 326292681a Add maximum-qos support to broker and client.
This comes in the form of:

* Per listener maximum_qos option, which can be in the range 0-2.
* Changes to mosquitto_publish*() to return MOSQ_ERR_QOS_NOT_SUPPORTED
  if attempting to publish with a higher QoS than supported.
* Bridges will downgrade messages to match the maximum QoS.

More tests on the broker side (specifically bridges) are required. This
needs bridge support for MQTT 5 first.
7 years ago
Roger A. Light dab6452a1d Add test for duplicate CONNECT. 7 years ago
Roger A. Light fcf4cd0b27 Merge branch 'master' into mqtt5 7 years ago
Roger A. Light a00dd29af8 Fix building where TLS-PSK is not available.
Closes #68.
7 years ago
Jelle van der Waa 1a6f8d3c28 src: ASN1_STRING_data is deprecated in OpenSSL 1.1
ASN1_STRING_get0_data replaces ASN1_STRING_data in OpenSSL 1.1 therefore
add an #ifdef for backwards compatibility.

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
7 years ago
Roger A. Light 6ef2c79e9a Add max_keepalive, for limiting keepalives of MQTT v5 clients. 7 years ago
Roger A. Light 1d3949bce0 Improve broker generated client ids for the non-Linux case.
Removes libuuid dependency.
7 years ago
Roger A. Light 7020fad86c Add server support for Assigned Client Identifier. 7 years ago
Roger A. Light d5108956bf Process session-expiry-interval on CONNECT and DISCONNECT.
Add test to check for invalid values.
7 years ago
Roger A. Light 54db895cb3 Rename clean_session to clean_start for v5. 7 years ago
Roger Light 9560c5bac7 Add retain_available support. 7 years ago
Roger Light 6ca746695f Pass db to send__connack() to give it access to config. 7 years ago
Roger A. Light 34c752a0d0 Give better error message if a client sends a password without a username.
Closes #1015. Thanks to TabascoEye.
7 years ago
Roger A. Light f77c1ca91b private struct mqtt5__property -> public mosquitto_property. 7 years ago
Roger A. Light 636e813d1c Load of constant renames ahead of making mqtt_protocol.h public. 7 years ago
Roger A. Light 9eebcf6704 Rename property__free_all->mosquitto_property_free_all
Make public function.
7 years ago
Roger A. Light eefa7f7604 All existing commands read properties. 7 years ago
Roger A. Light 723d9c2782 Check whether properties are on the correct commands. 7 years ago
Roger A. Light 267178bd99 User properties are copied from PUBLISH to PUBLISH. 7 years ago
Roger A. Light 0baf358cf8 Add properties member to will struct. 7 years ago
Roger A. Light 8210c1fa7a All outgoing packets now write property length for MQTT 5.
At the moment this only writes a 0 property length, i.e. no properties.
It does mean that output packets are more correct than before.
7 years ago
Roger A. Light 246c9e6565 Read will properties, and free properties immediately for the moment. 7 years ago
Roger A. Light f4b2838574 Property reading, and tests for byte properties. 7 years ago
Roger A. Light 400db91166 Handle UTF-8 validation in packet__read_string. 7 years ago
Roger A. Light 1488992ea8 Naive reading of MQTT 5 properties. No processing done. 7 years ago
Roger A. Light 561513fdd4 Very simple v5 CONNECT support - no properties. 7 years ago
Roger A. Light 99c6ec7f6e Protocol name will never be changed from MQTT. 7 years ago
Roger A. Light 0bacff11df Rename mqtt3_protocol.h -> mqtt_protocol.h. 7 years ago
Roger A. Light 11395f9852 Fix accessor functions for username and client id when used in plugin auth check. 7 years ago
Roger A. Light 88765a5e80 Consistent use of config.h across the project. 7 years ago
Roger A. Light a199cac69e Don't confuse expiring and duplicate clients. 7 years ago
Tobias Assarsson cc96485330 Add missing parameters to internal mosquitto_acl_check
Signed-off-by: Tobias Assarsson <tobias.assarsson@gmail.com>
7 years ago
Roger A. Light 0d25cb58b4 Fix `use_identity_as_username true` not working.
Closes #833.

Thanks to David Crook and Brice Waegeneire.

Bug: https://github.com/eclipse/mosquitto/issues/833

Signed-off-by: Roger A. Light <roger@atchoo.org>
7 years ago
bricewge 2a3305a4a2 fix #833
Signed-off-by: Brice Waegeneire <brice.wge@gmail.com>
7 years ago
Dave Miller 81a82f6fe2 Fix for issue #874
With special acknowledgement to sxsing (his github login) for his
help in development and testing of this fix.

NOTE: Pull-request is against master as the fixes branch has not
been updated with the v1.5 file src/handle_connect.c

Signed-off-by: Dave Miller <dmiller@tibco.com>
7 years ago
Roger A. Light 51ec5601c2 Fix memory leak that could be caused by a malicious CONNECT packet.
Closes #533493 (on Eclipse bugtracker)

Thanks to Daniel Romero.
8 years ago
Roger A. Light 23230b7b18 Add per-listener acl handling. 8 years ago
Roger A. Light 7615ae24ce Handle CONNECT protocol errors.
Don't allow username when no username flag set.
Don't allow password when no password flag set.

Closes #730. Closes #731.

Thanks to Umberto Boscolo.
8 years ago
Roger A. Light 729a09310a Add UTF-8 tests, plus some validation fixes.
Closes #693.
8 years ago
Roger A. Light 5ff8127f44 Fix will sending for duplicate clients.
When a client with an in-use client-id connects, if the old client has a
will, send the will message. Closes #26.

Thanks to Pierre F.
8 years ago
Roger A. Light 24d68b5af8 Remove support for openssl 1.0.0 and 1.0.1.
These are no longer supported by openssl.
8 years ago
Roger A. Light f4d238be18 Bump copyright years. 8 years ago