Update outdated dependencies

This commit is contained in:
Luca Palmieri 2023-02-18 22:26:43 +00:00
parent c6b6838ebb
commit 2c96418358
5 changed files with 19 additions and 17 deletions

18
Cargo.lock generated
View file

@ -1227,9 +1227,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
[[package]]
name = "linkify"
version = "0.8.1"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28d9967eb7d0bc31c39c6f52e8fce42991c0cd1f7a2078326f0b7a399a584c8d"
checksum = "96dd5884008358112bc66093362197c7248ece00d46624e2cf71e50029f8cff5"
dependencies = [
"memchr",
]
@ -1825,9 +1825,9 @@ dependencies = [
[[package]]
name = "serde-aux"
version = "3.1.0"
version = "4.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0a77223b653fa95f3f9864f3eb25b93e4ed170687eb42d85b6b98af21d5e1de"
checksum = "c599b3fd89a75e0c18d6d2be693ddb12cccaf771db4ff9e39097104808a014c0"
dependencies = [
"chrono",
"serde",
@ -2255,9 +2255,9 @@ dependencies = [
[[package]]
name = "tracing-actix-web"
version = "0.6.2"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d725b8fa6ef307b3f4856913523337de45c47cc79271bafd7acfb39559e3a2da"
checksum = "4082e4d81173e0b7ad3cfb71e9eaef0dd0cbb7b139fdb56394f488a3b0760b23"
dependencies = [
"actix-web",
"pin-project",
@ -2419,9 +2419,9 @@ dependencies = [
[[package]]
name = "validator"
version = "0.15.0"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f07b0a1390e01c0fc35ebb26b28ced33c9a3808f7f9fbe94d3cc01e233bfeed5"
checksum = "32ad5bf234c7d3ad1042e5252b7eddb2c4669ee23f32c7dd0e9b7705f07ef591"
dependencies = [
"idna 0.2.3",
"lazy_static",
@ -2736,7 +2736,7 @@ dependencies = [
"actix-web",
"anyhow",
"argon2",
"base64 0.13.1",
"base64 0.21.0",
"chrono",
"claims",
"config",

View file

@ -27,14 +27,14 @@ tracing-subscriber = { version = "0.3", features = ["registry", "env-filter"] }
tracing-bunyan-formatter = "0.3"
tracing-log = "0.1.1"
thiserror = "1.0.24"
serde-aux = "3"
serde-aux = "4"
unicode-segmentation = "1.7.1"
rand = { version = "0.8", features=["std_rng"] }
anyhow = "1.0.40"
base64 = "0.13.0"
base64 = "0.21.0"
argon2 = { version = "0.4", features = ["std"] }
validator = "0.15.0"
tracing-actix-web = "0.6"
validator = "0.16"
tracing-actix-web = "0.7"
secrecy = { version = "0.8", features = ["serde"] }
urlencoding = "2"
htmlescape = "0.3"
@ -50,4 +50,4 @@ quickcheck_macros = "0.9.1"
fake = "~2.3.0"
wiremock = "0.5"
serde_json = "1.0.61"
linkify = "0.8.0"
linkify = "0.9"

View file

@ -89,7 +89,7 @@ pub fn get_configuration() -> Result<Settings, config::ConfigError> {
configuration_directory.join("base.yaml"),
))
.add_source(config::File::from(
configuration_directory.join(&environment_filename),
configuration_directory.join(environment_filename),
))
// Add in settings from environment variables (with a prefix of APP and '__' as separator)
// E.g. `APP_APPLICATION__PORT=5001 would set `Settings.application.port`

View file

@ -8,6 +8,7 @@ use actix_web::http::{
};
use actix_web::{web, HttpRequest, HttpResponse, ResponseError};
use anyhow::Context;
use base64::Engine;
use secrecy::Secret;
use sqlx::PgPool;
@ -33,7 +34,8 @@ pub fn basic_authentication(headers: &HeaderMap) -> Result<Credentials, anyhow::
let base64encoded_credentials = header_value
.strip_prefix("Basic ")
.context("The authorization scheme was not 'Basic'.")?;
let decoded_credentials = base64::decode_config(base64encoded_credentials, base64::STANDARD)
let decoded_credentials = base64::engine::general_purpose::STANDARD
.decode(base64encoded_credentials)
.context("Failed to base64-decode 'Basic' credentials.")?;
let decoded_credentials = String::from_utf8(decoded_credentials)
.context("The decoded credential string is valid UTF8.")?;

View file

@ -39,7 +39,7 @@ impl Application {
"{}:{}",
configuration.application.host, configuration.application.port
);
let listener = TcpListener::bind(&address)?;
let listener = TcpListener::bind(address)?;
let port = listener.local_addr().unwrap().port();
let server = run(
listener,