Skip to content

Commit 4c57c27

Browse files
committed
Fixed removal bug
Fixed a bug that caused private and secret uploads not to accept the correct password when being deleted
1 parent 7fdc89a commit 4c57c27

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/endpoints/remove.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub async fn post_remove(
108108
if pasta.id == id {
109109
if pastas[i].readonly || pastas[i].encrypt_server {
110110
if password != *"" {
111-
let res = decrypt(pastas[i].encrypted_key.as_ref().unwrap(), &password);
111+
let res = decrypt(pastas[i].content.to_owned().as_str(), &password);
112112
if res.is_ok() {
113113
// remove the file itself
114114
if let Some(PastaFile { name, .. }) = &pasta.file {

0 commit comments

Comments
 (0)