mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2024-12-27 07:35:58 -05:00
Merge pull request #3704 from BlackDex/remove-debug-code
Remove debug code during attachment download
This commit is contained in:
commit
3dbfc484a5
@ -94,7 +94,7 @@ async fn web_files(p: PathBuf) -> Cached<Option<NamedFile>> {
|
|||||||
|
|
||||||
#[get("/attachments/<uuid>/<file_id>?<token>")]
|
#[get("/attachments/<uuid>/<file_id>?<token>")]
|
||||||
async fn attachments(uuid: SafeString, file_id: SafeString, token: String) -> Option<NamedFile> {
|
async fn attachments(uuid: SafeString, file_id: SafeString, token: String) -> Option<NamedFile> {
|
||||||
let Ok(claims) = dbg!(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 {
|
if claims.sub != *uuid || claims.file_id != *file_id {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user