tokio-xmpp: Ignore missing "version" stream attribute for 0114 components
From the prosody@ room: - 0114 doesn't mention the removal of @version on the stream, and it refers to 3920 which has it as a MUST. - 0114 streams have historically never used @version="1.0" - @version="1.0" implies stream features which 0114 doesn't have. - There was a proposal years ago to fix this but a new XEP was preferred (0225). The change here uses a compile-time check, and may have to change when support for 0225 arrives if it's still gated behind the "component" feature (even though it may be weird to have both under the same feature). We'll see when we get there. Signed-off-by: pep <pep@bouah.net>
This commit is contained in:
parent
7715d2e2a3
commit
77acd92c62
2 changed files with 8 additions and 4 deletions
|
|
@ -1,5 +1,7 @@
|
|||
Version NEXT:
|
||||
0000-00-00 RELEASER <releaser@domain>
|
||||
* Fixed:
|
||||
- Ignore missing "version" stream attribute for 0114 components.
|
||||
|
||||
Version 5.0.0:
|
||||
2025-10-28 pep <pep@bouah.net>
|
||||
|
|
|
|||
|
|
@ -876,10 +876,12 @@ impl StreamHeader<'static> {
|
|||
}
|
||||
}
|
||||
None => {
|
||||
return Err(io::Error::new(
|
||||
io::ErrorKind::InvalidData,
|
||||
"required `version` attribute missing",
|
||||
))
|
||||
if cfg!(not(feature = "component")) {
|
||||
return Err(io::Error::new(
|
||||
io::ErrorKind::InvalidData,
|
||||
"required `version` attribute missing",
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue