Fixed removal bug

Fixed a bug that caused private and secret uploads not to accept the correct password when being deleted
This commit is contained in:
Daniel Szabo 2023-07-11 21:22:26 +03:00
parent 7fdc89a48d
commit 4c57c27851

View file

@ -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 {