Update Rust and Crates

- Updated Rust to v1.72.0
- Updated all the crates
  Including a CVE https://github.com/dani-garcia/vaultwarden/security/dependabot/21
- Updated GitHub Workflows
- Run `cargo fmt` which has some new fmt's
- Moved from `rust-toolchain` to `rust-toolchain.toml`
This commit is contained in:
BlackDex
2023-08-28 16:48:42 +02:00
parent 66bff73ebf
commit 32543c46da
29 changed files with 219 additions and 212 deletions

View File

@@ -100,7 +100,9 @@ async fn web_files(p: PathBuf) -> Cached<Option<NamedFile>> {
#[get("/attachments/<uuid>/<file_id>?<token>")]
async fn attachments(uuid: SafeString, file_id: SafeString, token: String) -> Option<NamedFile> {
let Ok(claims) = decode_file_download(&token) else { return None };
let Ok(claims) = decode_file_download(&token) else {
return None;
};
if claims.sub != *uuid || claims.file_id != *file_id {
return None;
}