mirror of
https://github.com/szabodanika/microbin
synced 2024-11-10 03:34:17 +00:00
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:
parent
7fdc89a48d
commit
4c57c27851
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue