piknik
piknik copied to clipboard
Envelope deserialization doesn't catch empty forward_path
Describe the bug Envelope deserialization doesn't catch empty forward_path.
To Reproduce
serde_json::from_str::<Envelope>(r#"{"forward_path": []}"#).unwrap() // should panic, but don't
Expected behavior Deserializing envelope with empty forward_path should panic.
Environment (please complete the following information):
- Lettre version: 0.10.0
- OS: Ubuntu
Additional context I think I will open a PR to fix it soon (maybe tonight)
@paolobarbolini would you consider adding a custom type like in https://serde.rs/custom-date-format.html to check for the vec length as a valid fix?