Compare commits

..

37 Commits

Author SHA1 Message Date
00ae093958 Merge pull request 'Update Rust crate reqwest to v0.12.24' () from renovate/reqwest-0.x-lockfile into master 2025-10-14 00:37:48 +00:00
0dc185059f Update Rust crate reqwest to v0.12.24 2025-10-14 00:37:43 +00:00
8a17ca3f42 Merge pull request 'Update Rust crate serde to v1.0.228' () from renovate/serde-1.x-lockfile into master 2025-09-28 00:34:58 +00:00
2afb24c4ac Update Rust crate serde to v1.0.228 2025-09-28 00:34:51 +00:00
d0f973a26d Merge pull request 'Update Rust crate serde to v1.0.227' () from renovate/serde-1.x-lockfile into master 2025-09-26 00:35:02 +00:00
556b5aab7d Update Rust crate serde to v1.0.227 2025-09-26 00:34:55 +00:00
380a033e30 Merge pull request 'Update Rust crate serde to v1.0.226' () from renovate/serde-1.x-lockfile into master 2025-09-21 00:40:02 +00:00
6f6b4e7e1e Update Rust crate serde to v1.0.226 2025-09-21 00:39:56 +00:00
7a5af8d60c Merge pull request 'Update Rust crate serde to v1.0.225' () from renovate/serde-1.x-lockfile into master 2025-09-17 00:35:12 +00:00
2a0f757fee Update Rust crate serde to v1.0.225 2025-09-17 00:35:06 +00:00
e0ff7b1b21 Merge pull request 'Update Rust crate serde to v1.0.224' () from renovate/serde-1.x-lockfile into master 2025-09-16 00:35:12 +00:00
8aaee8da13 Update Rust crate serde to v1.0.224 2025-09-16 00:35:06 +00:00
6403d238a5 Merge pull request 'Update Rust crate serde_json to v1.0.145' () from renovate/serde_json-1.x-lockfile into master 2025-09-15 00:35:41 +00:00
31cd9d5a21 Merge pull request 'Update Rust crate serde to v1.0.223' () from renovate/serde-1.x-lockfile into master 2025-09-15 00:35:38 +00:00
20646f0627 Update Rust crate serde_json to v1.0.145 2025-09-15 00:35:37 +00:00
85a8bb01e8 Update Rust crate serde to v1.0.223 2025-09-15 00:35:32 +00:00
d3d4e3d236 Merge pull request 'Update Rust crate serde_json to v1.0.144' () from renovate/serde_json-1.x-lockfile into master 2025-09-14 00:36:01 +00:00
8f757bcdef Merge pull request 'Update Rust crate serde to v1.0.221' () from renovate/serde-1.x-lockfile into master 2025-09-14 00:35:56 +00:00
eabff0a4aa Update Rust crate serde_json to v1.0.144 2025-09-14 00:35:56 +00:00
86859119ae Update Rust crate serde to v1.0.221 2025-09-14 00:35:51 +00:00
3fe2238be0 Merge pull request 'Update Rust crate log to v0.4.28' () from renovate/log-0.x-lockfile into master 2025-09-04 00:28:21 +00:00
b94ffeb570 Update Rust crate log to v0.4.28 2025-09-04 00:28:16 +00:00
e91701159a Merge pull request 'Update Rust crate serde_json to v1.0.143' () from renovate/serde_json-1.x-lockfile into master 2025-08-20 00:27:16 +00:00
491d845e30 Update Rust crate serde_json to v1.0.143 2025-08-20 00:27:12 +00:00
7c37d2e129 Merge pull request 'Update Rust crate reqwest to v0.12.23' () from renovate/reqwest-0.x-lockfile into master 2025-08-13 00:27:19 +00:00
dd5c4f35cf Update Rust crate reqwest to v0.12.23 2025-08-13 00:27:15 +00:00
d7aebe76cc Merge pull request 'Update Rust crate serde_json to v1.0.142' () from renovate/serde_json-1.x-lockfile into master 2025-08-01 00:18:17 +00:00
72f99fbd7c Update Rust crate serde_json to v1.0.142 2025-08-01 00:18:12 +00:00
932239bfa0 Merge pull request 'Update Rust crate rand to v0.9.2' () from renovate/rand-0.x-lockfile into master 2025-07-21 00:15:44 +00:00
396467ca05 Update Rust crate rand to v0.9.2 2025-07-21 00:15:42 +00:00
73d3576c1a Merge pull request 'Update Rust crate serde_json to v1.0.141' () from renovate/serde_json-1.x-lockfile into master 2025-07-19 00:15:59 +00:00
41aff54fd8 Update Rust crate serde_json to v1.0.141 2025-07-19 00:15:57 +00:00
faadf35cc5 Update Rust crate reqwest to v0.12.22 2025-07-04 00:08:51 +00:00
a1f3152474 Fix cargo clippy issues 2025-07-03 08:22:55 +02:00
c394d29fee Update Rust crate reqwest to v0.12.20 2025-06-11 00:21:56 +00:00
9711754ff3 Update Rust crate reqwest to v0.12.19 2025-06-04 00:21:27 +00:00
240dfcc091 Fix cargo clippy issue 2025-06-03 20:37:37 +02:00
4 changed files with 31 additions and 26 deletions

41
Cargo.lock generated

@@ -722,9 +722,9 @@ checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856"
[[package]] [[package]]
name = "log" name = "log"
version = "0.4.27" version = "0.4.28"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
[[package]] [[package]]
name = "memchr" name = "memchr"
@@ -905,9 +905,9 @@ dependencies = [
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.9.1" version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
dependencies = [ dependencies = [
"rand_chacha", "rand_chacha",
"rand_core 0.9.3", "rand_core 0.9.3",
@@ -943,9 +943,9 @@ dependencies = [
[[package]] [[package]]
name = "reqwest" name = "reqwest"
version = "0.12.18" version = "0.12.24"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e98ff6b0dbbe4d5a37318f433d4fc82babd21631f194d370409ceb2e40b2f0b5" checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f"
dependencies = [ dependencies = [
"base64", "base64",
"bytes", "bytes",
@@ -959,12 +959,10 @@ dependencies = [
"hyper-rustls", "hyper-rustls",
"hyper-tls", "hyper-tls",
"hyper-util", "hyper-util",
"ipnet",
"js-sys", "js-sys",
"log", "log",
"mime", "mime",
"native-tls", "native-tls",
"once_cell",
"percent-encoding", "percent-encoding",
"pin-project-lite", "pin-project-lite",
"rustls-pki-types", "rustls-pki-types",
@@ -1092,18 +1090,28 @@ dependencies = [
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.219" version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
"serde_core",
"serde_derive",
]
[[package]]
name = "serde_core"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.219" version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -1112,14 +1120,15 @@ dependencies = [
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.140" version = "1.0.145"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
dependencies = [ dependencies = [
"itoa", "itoa",
"memchr", "memchr",
"ryu", "ryu",
"serde", "serde",
"serde_core",
] ]
[[package]] [[package]]
@@ -1318,9 +1327,9 @@ dependencies = [
[[package]] [[package]]
name = "tower-http" name = "tower-http"
version = "0.6.4" version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fdb0c213ca27a9f57ab69ddb290fd80d970922355b83ae380b395d3986b8a2e" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2"
dependencies = [ dependencies = [
"bitflags", "bitflags",
"bytes", "bytes",

@@ -39,7 +39,7 @@ impl Error for StateError {}
impl fmt::Display for StateError { impl fmt::Display for StateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "StateManager error {:?}", self) write!(f, "StateManager error {self:?}")
} }
} }

@@ -38,7 +38,7 @@ impl OpenIDConfig {
code: &str, code: &str,
redirect_uri: &str, redirect_uri: &str,
) -> Result<(OpenIDTokenResponse, String), Box<dyn Error>> { ) -> Result<(OpenIDTokenResponse, String), Box<dyn Error>> {
let authorization = BASE64_STANDARD.encode(format!("{}:{}", client_id, client_secret)); let authorization = BASE64_STANDARD.encode(format!("{client_id}:{client_secret}"));
let mut params = HashMap::new(); let mut params = HashMap::new();
params.insert("grant_type", "authorization_code"); params.insert("grant_type", "authorization_code");

@@ -1,12 +1,10 @@
use std::error::Error;
use std::io::ErrorKind;
use aes_gcm::aead::{Aead, OsRng}; use aes_gcm::aead::{Aead, OsRng};
use aes_gcm::{Aes256Gcm, Key, KeyInit, Nonce}; use aes_gcm::{Aes256Gcm, Key, KeyInit, Nonce};
use base64::engine::general_purpose::STANDARD as BASE64_STANDARD; use base64::engine::general_purpose::STANDARD as BASE64_STANDARD;
use base64::Engine as _; use base64::Engine as _;
use bincode::{Decode, Encode}; use bincode::{Decode, Encode};
use rand::Rng; use rand::Rng;
use std::error::Error;
/// The lenght of the nonce used to initialize encryption /// The lenght of the nonce used to initialize encryption
const NONCE_LEN: usize = 12; const NONCE_LEN: usize = 12;
@@ -45,8 +43,7 @@ impl CryptoWrapper {
let bytes = BASE64_STANDARD.decode(input)?; let bytes = BASE64_STANDARD.decode(input)?;
if bytes.len() < NONCE_LEN { if bytes.len() < NONCE_LEN {
return Err(Box::new(std::io::Error::new( return Err(Box::new(std::io::Error::other(
ErrorKind::Other,
"Input string is smaller than nonce!", "Input string is smaller than nonce!",
))); )));
} }
@@ -59,9 +56,8 @@ impl CryptoWrapper {
let dec = match aes_key.decrypt(Nonce::from_slice(nonce), enc) { let dec = match aes_key.decrypt(Nonce::from_slice(nonce), enc) {
Ok(d) => d, Ok(d) => d,
Err(e) => { Err(e) => {
log::error!("Failed to decrypt wrapped data! {:#?}", e); log::error!("Failed to decrypt wrapped data! {e:#?}");
return Err(Box::new(std::io::Error::new( return Err(Box::new(std::io::Error::other(
ErrorKind::Other,
"Failed to decrypt wrapped data!", "Failed to decrypt wrapped data!",
))); )));
} }