Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-92817

QMqttTopicFilter also matches topics just starting with the filter name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.12, 6.2.7, 6.4.1, 6.5.0 Beta1
    • 6.0, 6.1, 5.15, 6.2
    • MQTT
    • None
    • 56439080fa (qt/qtmqtt/dev) 56439080fa (qt/tqtc-qtmqtt/dev) cf98fd2ff3 (qt/qtmqtt/6.4) 98426e3b02 (qt/tqtc-qtmqtt/6.2) cf98fd2ff3 (qt/tqtc-qtmqtt/6.4) 86d3e100f8 (qt/tqtc-qtmqtt/5.15) cf98fd2ff3 (qt/tqtc-qtmqtt/6.4.1) 98426e3b02 (qt/tqtc-qtmqtt/6.2.7)

    Description

      QMqttTopicFilter{QLatin1String("x/#")}.match(QLatin1String("xy/foo"))
      

      evaluates to true so when subscribing to a wildcard topic "x/#", one will also receive messages for topic "xy/foo". The same applies when using numbers as topic names, e.g. the topic filter "items/1/#" will match messages for topic "items/123/foo".

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mkalinow Maurice Kalinowski
            tobydox Tobias Junghans
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes