+10 -10 +/-5 browse
1 | diff --git a/Cargo.lock b/Cargo.lock |
2 | index dec3be9..f803c9f 100644 |
3 | --- a/Cargo.lock |
4 | +++ b/Cargo.lock |
5 | @@ -2092,12 +2092,12 @@ dependencies = [ |
6 | |
7 | [[package]] |
8 | name = "libloading" |
9 | - version = "0.7.4" |
10 | + version = "0.8.5" |
11 | source = "registry+https://github.com/rust-lang/crates.io-index" |
12 | - checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" |
13 | + checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" |
14 | dependencies = [ |
15 | "cfg-if 1.0.0", |
16 | - "winapi", |
17 | + "windows-targets 0.52.5", |
18 | ] |
19 | |
20 | [[package]] |
21 | @@ -2327,9 +2327,9 @@ checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" |
22 | |
23 | [[package]] |
24 | name = "melib" |
25 | - version = "0.8.6" |
26 | + version = "0.8.7" |
27 | source = "registry+https://github.com/rust-lang/crates.io-index" |
28 | - checksum = "4f233699ab6a71d41529624e3d9600c8a3a208874fcf4ec4a05778314afdd2e7" |
29 | + checksum = "7162bc6ee87dbd5c2b5b1b1cad725cbaef87722cd69b1c98a404226b72060027" |
30 | dependencies = [ |
31 | "async-stream", |
32 | "base64 0.13.1", |
33 | diff --git a/mailpot-archives/src/main.rs b/mailpot-archives/src/main.rs |
34 | index e6ae3cc..56892f0 100644 |
35 | --- a/mailpot-archives/src/main.rs |
36 | +++ b/mailpot-archives/src/main.rs |
37 | @@ -186,7 +186,7 @@ fn run_app() -> std::result::Result<(), Box<dyn std::error::Error>> { |
38 | let envelope = melib::Envelope::from_bytes(post.message.as_slice(), None) |
39 | .map_err(|err| format!("Could not parse mail {}: {err}", post.message_id))?; |
40 | let body = envelope.body_bytes(post.message.as_slice()); |
41 | - let body_text = body.text(); |
42 | + let body_text = body.text(melib::attachment_types::Text::Rfc822); |
43 | let subject = envelope.subject(); |
44 | let mut subject_ref = subject.trim(); |
45 | if subject_ref.starts_with('[') |
46 | diff --git a/mailpot-web/src/lists.rs b/mailpot-web/src/lists.rs |
47 | index 9791c7a..7381da5 100644 |
48 | --- a/mailpot-web/src/lists.rs |
49 | +++ b/mailpot-web/src/lists.rs |
50 | @@ -190,7 +190,7 @@ pub async fn list_post( |
51 | .map(|(depth, p)| { |
52 | let envelope = melib::Envelope::from_bytes(p.message.as_slice(), None).unwrap(); |
53 | let body = envelope.body_bytes(p.message.as_slice()); |
54 | - let body_text = body.text(); |
55 | + let body_text = body.text(melib::attachment_types::Text::Rfc822); |
56 | let date = envelope.date_as_str().to_string(); |
57 | (depth, p, body_text, date) |
58 | }) |
59 | @@ -199,7 +199,7 @@ pub async fn list_post( |
60 | let envelope = melib::Envelope::from_bytes(post.message.as_slice(), None) |
61 | .with_status(StatusCode::BAD_REQUEST)?; |
62 | let body = envelope.body_bytes(post.message.as_slice()); |
63 | - let body_text = body.text(); |
64 | + let body_text = body.text(melib::attachment_types::Text::Rfc822); |
65 | let subject = envelope.subject(); |
66 | let mut subject_ref = subject.trim(); |
67 | if subject_ref.starts_with('[') |
68 | diff --git a/mailpot/Cargo.toml b/mailpot/Cargo.toml |
69 | index e0bedfd..4e2f1e7 100644 |
70 | --- a/mailpot/Cargo.toml |
71 | +++ b/mailpot/Cargo.toml |
72 | @@ -19,7 +19,7 @@ chrono = { version = "^0.4", features = ["serde", ] } |
73 | data-encoding = { version = "2.1.1" } |
74 | jsonschema = { version = "0.17", default-features = false } |
75 | log = "0.4" |
76 | - melib = { version = "0.8.6", default-features = false, features = ["mbox", "smtp", "maildir"] } |
77 | + melib = { version = "0.8.7", default-features = false, features = ["mbox", "smtp", "maildir"] } |
78 | minijinja = { version = "0.31.0", features = ["source", ] } |
79 | percent-encoding = { version = "^2.1" } |
80 | rusqlite = { version = "^0.30", features = ["bundled", "functions", "trace", "hooks", "serde_json", "array", "chrono", "unlock_notify"] } |
81 | diff --git a/mailpot/src/posts.rs b/mailpot/src/posts.rs |
82 | index d3525dd..c09e97b 100644 |
83 | --- a/mailpot/src/posts.rs |
84 | +++ b/mailpot/src/posts.rs |
85 | @@ -565,7 +565,7 @@ impl Connection { |
86 | env.from(), |
87 | ); |
88 | let body = env.body_bytes(raw); |
89 | - let password = body.text(); |
90 | + let password = body.text(melib::attachment_types::Text::Rfc822); |
91 | // TODO: validate SSH public key with `ssh-keygen`. |
92 | for f in env.from() { |
93 | let email_from = f.get_email(); |