From 4c57c27851dfa5c8c2a9165c23a5833f8e6917d8 Mon Sep 17 00:00:00 2001 From: Daniel Szabo Date: Tue, 11 Jul 2023 21:22:26 +0300 Subject: [PATCH] Fixed removal bug Fixed a bug that caused private and secret uploads not to accept the correct password when being deleted --- src/endpoints/remove.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/endpoints/remove.rs b/src/endpoints/remove.rs index 1d73203..644fcab 100644 --- a/src/endpoints/remove.rs +++ b/src/endpoints/remove.rs @@ -108,7 +108,7 @@ pub async fn post_remove( if pasta.id == id { if pastas[i].readonly || pastas[i].encrypt_server { if password != *"" { - let res = decrypt(pastas[i].encrypted_key.as_ref().unwrap(), &password); + let res = decrypt(pastas[i].content.to_owned().as_str(), &password); if res.is_ok() { // remove the file itself if let Some(PastaFile { name, .. }) = &pasta.file {