-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution:
Fixed
-
Affects Version/s:
3.1.1
-
-
-
-
Proposal:
Hide
If the first data that the server receives is not an MQTT CONNECT packet, including the correct protocol name, then it MAY continue to process it
as some other protocol, alternatively it MUST disconnect the TCP session without sending a CONNACK. The server MUST NOT continue to process a malformed initial packet in line with this specification.
Non normative comment.
A server can support multiple protocols by checking to see if the initial data it receives is a valid CONNECT packet or valid data for some other protocol such as an earlier version of the MQTT specification.
Show
If the first data that the server receives is not an MQTT CONNECT packet, including the correct protocol name, then it MAY continue to process it
as some other protocol, alternatively it MUST disconnect the TCP session without sending a CONNACK. The server MUST NOT continue to process a malformed initial packet in line with this specification.
Non normative comment.
A server can support multiple protocols by checking to see if the initial data it receives is a valid CONNECT packet or valid data for some other protocol such as an earlier version of the MQTT specification.
-
What should a server do if it receives a connect packet with and incorrect protocol name?
If the server receives a connect packet with no MQIsdp field present ( or its replacement field) The server could.
1) Disconnect the Clients TCP session
2) Return CONNACK RC=X01, then disconnect the clients TCP session.
3) Return CONNACK with some new return code and then disconnect the clients TCP session.
{"report":{"apdex":0.5,"isInitial":true,"journeyId":"895c582e-7fbf-4a1d-a0a7-a894d767778c","key":"jira.project.issue.view-issue","navigationType":0,"readyForUser":1254.5999999046326,"redirectCount":0,"resourceLoadedEnd":1378.0999999046326,"resourceLoadedStart":436.59999990463257,"resourceTiming":[{"duration":405.2999997138977,"initiatorType":"link","name":"https://issues.oasis-open.org/s/3edeca31ab9ba77980aae0809fbe7121-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/css/_super/batch.css","startTime":436.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":436.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":841.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":406.19999980926514,"initiatorType":"link","name":"https://issues.oasis-open.org/s/7d2823769c2e7b66e860863fe879b7f8-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/9aebb1c0aaa4c36289529757ec9dbb54/_/download/contextbatch/css/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&richediton=true","startTime":437,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":437,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":843.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":407.59999990463257,"initiatorType":"link","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/8.0.5/_/download/batch/com.atlassian.auiplugin:split_aui.pattern.label/com.atlassian.auiplugin:split_aui.pattern.label.css","startTime":437.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":437.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":844.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":408.1000003814697,"initiatorType":"link","name":"https://issues.oasis-open.org/s/645acc233eb869f48a571293b8358a7d-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:global-static-adgs/jira.webresources:global-static-adgs.css","startTime":437.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":437.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":845.5,"responseStart":0,"secureConnectionStart":0},{"duration":416.59999990463257,"initiatorType":"link","name":"https://issues.oasis-open.org/s/a0dd6509771c1de0667aae5429c04cda-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:global-static/jira.webresources:global-static.css","startTime":437.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":437.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":854.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":476.7000002861023,"initiatorType":"script","name":"https://issues.oasis-open.org/s/e5479157e7a0c08b005e6522f2f04104-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/js/_super/batch.js?locale=en-US","startTime":437.7999997138977,"connectEnd":437.7999997138977,"connectStart":437.7999997138977,"domainLookupEnd":437.7999997138977,"domainLookupStart":437.7999997138977,"fetchStart":437.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":437.7999997138977,"responseEnd":914.5,"responseStart":914.5,"secureConnectionStart":437.7999997138977},{"duration":489.7000002861023,"initiatorType":"script","name":"https://issues.oasis-open.org/s/83514d5d4e8543747b02042eafcdc99c-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/9aebb1c0aaa4c36289529757ec9dbb54/_/download/contextbatch/js/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":438.3999996185303,"connectEnd":438.3999996185303,"connectStart":438.3999996185303,"domainLookupEnd":438.3999996185303,"domainLookupStart":438.3999996185303,"fetchStart":438.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":438.3999996185303,"responseEnd":928.0999999046326,"responseStart":928.0999999046326,"secureConnectionStart":438.3999996185303},{"duration":491.90000009536743,"initiatorType":"script","name":"https://issues.oasis-open.org/s/70bb2263e59e7e1f04fbd137c80b895b-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/aae1242f5fc81cc6a5bb8bc963ccda29/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en-US","startTime":438.59999990463257,"connectEnd":438.59999990463257,"connectStart":438.59999990463257,"domainLookupEnd":438.59999990463257,"domainLookupStart":438.59999990463257,"fetchStart":438.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":438.59999990463257,"responseEnd":930.5,"responseStart":930.5,"secureConnectionStart":438.59999990463257},{"duration":492.2000002861023,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":438.7999997138977,"connectEnd":438.7999997138977,"connectStart":438.7999997138977,"domainLookupEnd":438.7999997138977,"domainLookupStart":438.7999997138977,"fetchStart":438.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":438.7999997138977,"responseEnd":931,"responseStart":931,"secureConnectionStart":438.7999997138977},{"duration":492.3999996185303,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":439,"connectEnd":439,"connectStart":439,"domainLookupEnd":439,"domainLookupStart":439,"fetchStart":439,"redirectEnd":0,"redirectStart":0,"requestStart":439,"responseEnd":931.3999996185303,"responseStart":931.3999996185303,"secureConnectionStart":439},{"duration":492.90000009536743,"initiatorType":"script","name":"https://issues.oasis-open.org/s/cda37faab827dbdf305de8efe8282062-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/8.0.5/_/download/batch/com.atlassian.auiplugin:split_aui.pattern.label/com.atlassian.auiplugin:split_aui.pattern.label.js?locale=en-US","startTime":439.09999990463257,"connectEnd":439.09999990463257,"connectStart":439.09999990463257,"domainLookupEnd":439.09999990463257,"domainLookupStart":439.09999990463257,"fetchStart":439.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":439.09999990463257,"responseEnd":932,"responseStart":932,"secureConnectionStart":439.09999990463257},{"duration":493.1000003814697,"initiatorType":"link","name":"https://issues.oasis-open.org/s/07245784f53abc49bad9d9d4d36c577a-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/cadc4f20cc5c138dee060d42cf85f220/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":439.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":439.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":932.5,"responseStart":0,"secureConnectionStart":0},{"duration":493,"initiatorType":"script","name":"https://issues.oasis-open.org/rest/api/1.0/shortcuts/803004/a29179d70fa8562374ee16707692af77/shortcuts.js?context=issuenavigation&context=issueaction","startTime":439.5,"connectEnd":439.5,"connectStart":439.5,"domainLookupEnd":439.5,"domainLookupStart":439.5,"fetchStart":439.5,"redirectEnd":0,"redirectStart":0,"requestStart":439.5,"responseEnd":932.5,"responseStart":932.5,"secureConnectionStart":439.5},{"duration":468.6000003814697,"initiatorType":"link","name":"https://issues.oasis-open.org/s/f77fd89aa211a76b20e9b0e63564383c-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/4a9288299d147101bf66484f4be48925/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.css?jira.create.linked.issue=true&richediton=true","startTime":465.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":465.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":934,"responseStart":0,"secureConnectionStart":0},{"duration":467.7999997138977,"initiatorType":"script","name":"https://issues.oasis-open.org/s/41525c48ddceeb9b11e54085268fc285-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/4a9288299d147101bf66484f4be48925/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.js?jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":466,"connectEnd":466,"connectStart":466,"domainLookupEnd":466,"domainLookupStart":466,"fetchStart":466,"redirectEnd":0,"redirectStart":0,"requestStart":466,"responseEnd":933.7999997138977,"responseStart":933.7999997138977,"secureConnectionStart":466},{"duration":645.5,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":474.09999990463257,"connectEnd":474.09999990463257,"connectStart":474.09999990463257,"domainLookupEnd":474.09999990463257,"domainLookupStart":474.09999990463257,"fetchStart":474.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":474.09999990463257,"responseEnd":1119.5999999046326,"responseStart":1119.5,"secureConnectionStart":474.09999990463257}],"threshold":1000,"fetchStart":0,"domainLookupStart":327,"domainLookupEnd":327,"connectStart":327,"connectEnd":378,"secureConnectionStart":352,"requestStart":378,"responseStart":427,"responseEnd":503,"domLoading":431,"domInteractive":1435,"domContentLoadedEventStart":1435,"domContentLoadedEventEnd":1490,"domComplete":1777,"loadEventStart":1777,"loadEventEnd":1780,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[],"measures":[],"correlationId":"12aa81ab4f933d","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":98,"dbReadsTimeInMs":16,"dbConnsTimeInMs":19,"applicationHash":"4d4040e0714d65b7fffa4801569d014c0b16eaa9","experiments":[]}}
The protocol the client is using is identified in the connect packet by the combination of both the protocol name and protocol version number.
If either is missing then the packet is not properly encoded and the server should treat it as it would any other badly formed MQTT packet - drop the connection with no feedback sent.
If both are present, but either one is not recognised or supported, then that is what return code "0x01 - Unacceptable Protocol Version" was intended for. It may call it say 'protocol version' in its name, but I believe the intent was it cover both version and name.