From e202eafb7fabce542a57ddc9968bb5a7b6aebfbf Mon Sep 17 00:00:00 2001 From: Cynede Date: Mon, 11 Feb 2019 18:40:19 +0400 Subject: [PATCH 1/3] feat(transport): Update base64 to ^0.10 --- lettre/Cargo.toml | 2 +- lettre_email/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lettre/Cargo.toml b/lettre/Cargo.toml index c51a59f..b23ce8d 100644 --- a/lettre/Cargo.toml +++ b/lettre/Cargo.toml @@ -23,7 +23,7 @@ log = "^0.4" nom = { version = "^4.0", optional = true } bufstream = { version = "^0.1", optional = true } native-tls = { version = "^0.2", optional = true } -base64 = { version = "^0.9", optional = true } +base64 = { version = "^0.10", optional = true } hostname = { version = "^0.1", optional = true } serde = { version = "^1.0", optional = true } serde_json = { version = "^1.0", optional = true } diff --git a/lettre_email/Cargo.toml b/lettre_email/Cargo.toml index fd83c84..2627c0e 100644 --- a/lettre_email/Cargo.toml +++ b/lettre_email/Cargo.toml @@ -28,6 +28,6 @@ mime = "^0.3" time = "^0.1" uuid = { version = "^0.7", features = ["v4"] } lettre = { version = "^0.9", path = "../lettre", default-features = false } -base64 = "^0.9" +base64 = "^0.10" failure = "^0.1" failure_derive = "^0.1" From 78ba8007cdf581ee7abd1c241649423d4526d7ba Mon Sep 17 00:00:00 2001 From: Bastien Orivel Date: Sun, 24 Feb 2019 14:27:25 +0100 Subject: [PATCH 2/3] fix(lettre_email): Use the original rust-email The fork is 10 commits behind the original repo, I don't see a point in using it as the rest of the history is the same --- lettre_email/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lettre_email/Cargo.toml b/lettre_email/Cargo.toml index fd83c84..c9e1082 100644 --- a/lettre_email/Cargo.toml +++ b/lettre_email/Cargo.toml @@ -23,7 +23,7 @@ lettre = { version = "^0.9", path = "../lettre", features = ["smtp-transport"] } glob = "0.2" [dependencies] -email = { git = "https://github.com/lettre/rust-email" } +email = { git = "https://github.com/niax/rust-email" } mime = "^0.3" time = "^0.1" uuid = { version = "^0.7", features = ["v4"] } From 72f3cd8f12d95ca4e78703eeafc6bdc4cf4f127c Mon Sep 17 00:00:00 2001 From: leo-lb Date: Tue, 12 Mar 2019 01:03:58 +0100 Subject: [PATCH 3/3] fix(smtp-transport): Client::read_response infinite loop I have encountered an issue on Gmail where the server returned an error, and the code was stuck here looping indefinitely. This commit fixes the issue. --- lettre/src/smtp/client/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lettre/src/smtp/client/mod.rs b/lettre/src/smtp/client/mod.rs index c2c1843..315a78a 100644 --- a/lettre/src/smtp/client/mod.rs +++ b/lettre/src/smtp/client/mod.rs @@ -254,7 +254,13 @@ impl InnerClient { break; } // TODO read more than one line - self.stream.as_mut().unwrap().read_line(&mut raw_response)?; + let read_count = self.stream.as_mut().unwrap().read_line(&mut raw_response)?; + + // EOF is reached + if read_count == 0 { + break; + } + response = raw_response.parse::(); }