Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Envelope deserialization doesn't catch empty forward_path #806

Closed
wyfo opened this issue Jul 25, 2022 · 1 comment
Closed

Envelope deserialization doesn't catch empty forward_path #806

wyfo opened this issue Jul 25, 2022 · 1 comment

Comments

@wyfo
Copy link

wyfo commented Jul 25, 2022

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)

@Agreon
Copy link

Agreon commented Sep 30, 2022

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants