Update dependencies

This commit is contained in:
Daniel García
2021-03-22 20:00:57 +01:00
parent 1fc6c30652
commit f9ebb780f9
3 changed files with 96 additions and 97 deletions

155
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -71,7 +71,7 @@ uuid = { version = "0.8.2", features = ["v4"] }
# Date and time libraries
chrono = { version = "0.4.19", features = ["serde"] }
chrono-tz = "0.5.3"
time = "0.2.25"
time = "0.2.26"
# TOTP library
oath = "0.10.2"
@ -99,7 +99,7 @@ num-traits = "0.2.14"
num-derive = "0.3.3"
# Email libraries
lettre = { version = "0.10.0-beta.2", features = ["smtp-transport", "builder", "serde", "native-tls", "hostname", "tracing"], default-features = false }
lettre = { version = "0.10.0-beta.3", features = ["smtp-transport", "builder", "serde", "native-tls", "hostname", "tracing"], default-features = false }
newline-converter = "0.2.0"
# Template library
@ -108,11 +108,11 @@ handlebars = { version = "3.5.3", features = ["dir_source"] }
# For favicon extraction from main website
html5ever = "0.25.1"
markup5ever_rcdom = "0.1.0"
regex = { version = "1.4.4", features = ["std", "perf"], default-features = false }
regex = { version = "1.4.5", features = ["std", "perf"], default-features = false }
data-url = "0.1.0"
# Used by U2F, JWT and Postgres
openssl = "0.10.32"
openssl = "0.10.33"
# URL encoding library
percent-encoding = "2.1.0"
@ -126,7 +126,7 @@ pico-args = "0.4.0"
backtrace = "0.3.56"
# Macro ident concatenation
paste = "1.0.4"
paste = "1.0.5"
[patch.crates-io]
# Use newest ring

View File

@ -332,21 +332,19 @@ fn send_email(address: &str, subject: &str, body_html: String, body_text: String
match mailer().send(&email) {
Ok(_) => Ok(()),
// Match some common errors and make them more user friendly
Err(e) => match e {
lettre::transport::smtp::Error::Client(x) => {
err!(format!("SMTP Client error: {}", x));
},
lettre::transport::smtp::Error::Transient(x) => {
err!(format!("SMTP 4xx error: {:?}", x.message));
},
lettre::transport::smtp::Error::Permanent(x) => {
err!(format!("SMTP 5xx error: {:?}", x.message));
},
lettre::transport::smtp::Error::Io(x) => {
err!(format!("SMTP IO error: {}", x));
},
// Fallback for all other errors
_ => Err(e.into())
Err(e) => {
if e.is_client() {
err!(format!("SMTP Client error: {}", e));
} else if e.is_transient() {
err!(format!("SMTP 4xx error: {:?}", e));
} else if e.is_permanent() {
err!(format!("SMTP 5xx error: {:?}", e));
} else if e.is_timeout() {
err!(format!("SMTP timeout error: {:?}", e));
} else {
Err(e.into())
}
}
}
}