The qmqttclient.cpp file contains parts of the MQTT protocol
implementation, and hence marked as security-critical.
The qmqtttopicname.cpp file contains the code that validates the topic
name and also parses the levels -> it is a data-parser, so should be
security-critical as well.
Amends 18548033e1, which incorrectly
marked these files as significant.
Not picking to 6.9 anymore, because that branch is already closed.
Task-number: QTBUG-135764
Pick-to: 6.10 6.8
Change-Id: I0e8b72fb1d24b7bbf6ac5edab63e137f9d36dd30
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Not implementing this function causes a lot if Invalid Socket
Specified in the tests.
Also fixed a problem with broker_connection.h where
DefaultVersionTestData did not evaluate to version(0)
if MQTT_TEST_PROTOCOL was defined.
Fixes: QTBUG-137305
Pick-to: 6.10
Change-Id: I4b825196548a3f5bf07c3bb4203a0b46033004ba
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The \generatelist command takes an optional argument
that affect how the members are listed, for example,
`classesbymodule` which creates an annotated list of
the classes in a named C++ module.
`groupsbymodule` is not recognized or documented. QDoc
falls back to generating a list of all members of a
group in this case. While the end result is correct,
this relies on an undocumented feature that is likely
to change and break.
Replace these instances with an explicit \annotatedlist
command that produces the same output.
Pick-to: 6.10
Task-number: QTBUG-138901
Change-Id: I4c36087ff39efc740bc938888aa2531f635d9b67
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Use the QUuid::Id128 format when converting a QUuid to string.
This format does not use curly braces and dashes, so we do not need
to remove them later.
Change-Id: I9b76c4eea03a4ba150e2a95ed8d108a6b1d9b8e6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This is the default level. All critical parts were identified in the
previous commits.
Fixes: QTBUG-135764
Pick-to: 6.10 6.9 6.8
Change-Id: Ib9df3db37e3efe3074f0fbc99eb60d31281d5a5a
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
The QMqttTopicFilter::isValid() method parses the user-provided
string and validates it according to the MQTT protocol.
Task-number: QTBUG-135764
Pick-to: 6.10 6.9 6.8
Change-Id: I841bf83bbf29a2cdf4cf3faec93615a33f597241
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
The qmqttconnection.cpp file implements parts of the MQTT protocol,
including proper packet generation
(e.g. in QMqttConnection::sendControlConnect()) and parsing
(e.g. in QMqttConnection::processDataHelper()).
The qmqttcontrolpacket.cpp file implements payload serialization
in QMqttControlPacket::serializePayload().
Task-number: QTBUG-135764
Pick-to: 6.10 6.9 6.8
Change-Id: I5b398c8739e549ba849fcc31f25cd05ca3384f30
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Since we could only have one subscription for each topic it was
not possible to return a new subscription when a subscription
request comes in on a topic that is scheduled for destruction.
We solve this by switching to a QMultiHash for the active
subscriptions, allowing more then one subscription for a
given topic. However, at most one of these subscriptions
are not present in the list of subscriptions scheduled to
be unsubscribed
This patch also changes multiple unsubscribes to the
same topic. Earlier all would return true, and
m_pendingUnsubscriptions would be updated for all
requests.
The new behavior is that only the first unsubscribe
is acted upon. Furthere requests will return false.
Fixes: QTBUG-135653
Pick-to: 6.8 6.9 6.10
Change-Id: I5a79efb68b3191e185325a89cc2042c773bb5c12
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
The earliest we can move this is right after `BuildInternals`. This
allows us to add function calls before navigating the `find_package`
tree of the dependents.
Task-number: QTBUG-135233
Change-Id: I2ee7bb0cb5addc422405768ba5706607a7257d6f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Added a \note, but keeping the example to show how to create custom
transports.
Pick-to: 6.10
Change-Id: Idf3b22532f6e0b94a0113cea6152a36e81398ea9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Found in api-review.
Task-number: QTBUG-137478
Pick-to: 6.10
Change-Id: I73984caae5714c0f3cddd0f1770ddf19fd6fcd49
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Moved declaration of the new connectToHostWebSocket[Secure]
afer connectToHostEncrypted
Task-number: QTBUG-137478
Pick-to: 6.10
Change-Id: I58ef8da23bf9759a1744908e02c6b9ef5db405f1
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>