Upgrade imap-proto to 0.17.x to fix parsing LOGIN response with an en dash - #144
Conversation
73f3c40 to
1244a72
Compare
1244a72 to
5aaba9e
Compare
5aaba9e to
fbd55f8
Compare
fbd55f8 to
ebff05a
Compare
| #[cfg_attr(feature = "runtime-tokio", tokio::test)] | ||
| #[cfg_attr(feature = "runtime-async-std", async_std::test)] | ||
| async fn login_with_capabilities_and_en_dash() { | ||
| let response = b"A0001 OK [CAPABILITY IMAP4rev1 LOGIN-REFERRALS ID ENABLE IDLE SASL-IR LITERAL+ AUTH=PLAIN AUTH=LOGIN AUTH=XOAUTH2] Logged in \xe2\x80\x93 go ahead!\r\n".to_vec(); |
There was a problem hiding this comment.
this uses a tagged response while in #145 it's untagged
* OK [CAPABILITY IMAP4rev1 LOGIN-REFERRALS ID ENABLE IDLE SASL-IR
LITERAL+ AUTH=PLAIN AUTH=LOGIN AUTH=XOAUTH2] Logged in – go ahead!
it's probably ok and touches the same code paths? Still would be better if the test covers the exact bytes reported in the issue.
There was a problem hiding this comment.
It likely failed here while reading pre-login banner: https://github.com/chatmail/core/blob/736979b451cd9a2b8f8a2c59b1f10602038a6148/src/imap/client.rs#L239-L242
I added another test for the banner, calling read_response() directly.
| @@ -1,3 +1,3 @@ | |||
| [package] | |||
| name = "async-imap" | |||
| version = "0.11.3" | |||
There was a problem hiding this comment.
this probably should be bumbed to 0.12.0 as imap_proto is part of the exported api, and we bump it.
There was a problem hiding this comment.
Will update it to 0.12.0 when releasing.
ebff05a to
171f0b8
Compare
Opened chatmail/core#8769, it compiles with a minor change. |
Fixes #145
The bug is fixed upstream, so this PR is upgrading imap-proto to 0.17.0, but also adds a test that was previously failing to avoid regressions.