xmpp-rs-mirror/tokio-xmpp
Maxime “pep” Buquet 44eaa5a6ea tokio-xmpp: Prevent XmppCodec from producing invalid stanza
This bug was introduced by 2e97f4de2e, to
fix another bug where the parser would choke on whitespace.

The bug would manifest whenever a stanza was sent in different parts,
for example:
<< "<message "
<< "type='chat><body>foo</body></message>"

Would produce the following once parsed:
`<messagetype='chat'><body>foo</body></messagetype='chat'>`

This commit ensures this doesn't happen anymore (by not trimming
whitespaces before feeding the parser), and also ensures that
whitespaces are now handled at the correct layer.

The removal of xmpp_codec::test_lone_whitespace only happens because I'm
not sure if it's supposed to be here anymore. Maybe it should be at a
different layer? Or written differently?

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-01-22 01:25:15 +01:00
..
examples
src
.gitignore
Cargo.toml tokio-xmpp: Add some ugly premature logging useful for debugging 2019-12-09 03:46:03 +01:00
logo.svg
README.md

TODO

  • minidom ns
  • replace debug output with log crate
  • customize tls verify?
  • more tests