jid: Fix JID parts serde deserialization

serde was bypassing the validation these types rely on, making them
completely unsound in an XMPP context.

Fixes #165.
This commit is contained in:
Link Mauve 2025-12-25 02:42:00 +01:00
commit 60bf821c63
2 changed files with 135 additions and 0 deletions

View file

@ -2,6 +2,9 @@ Version NEXT:
Version 0.12.1, release 2025-11-02:
* Changes:
- Make serde deserialization actually validate the `NodePart`, `DomainPart`
and `ResourcePart`, it was previously completely unsound, creating these
types without validating their invariants.
- The 'quote' feature now uses `jid::Jid` instead of `::jid::Jid` to
stop requiring importing the module as a dependency of the project. The
`jid` module just needs to be made available, for example: `use