Prevent deleting the email when fax sender is not authorized (#6981)

* Prevent deleting the email when fax sender is not authorized
This commit is contained in:
frytimo 2024-05-22 01:51:50 -03:00 committed by GitHub
parent e6860a54b9
commit 46b7c5536a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 4 deletions

View File

@ -262,11 +262,14 @@ if (!empty($result) && @sizeof($result) != 0) {
//reset variables
unset($fax_numbers);
}
//delete email
if (imap_delete($connection, $email_id, FT_UID)) {
imap_expunge($connection);
//delete email
if (imap_delete($connection, $email_id, FT_UID)) {
imap_expunge($connection);
}
}
else {
//unauthorized sender
}
}
unset($authorized_senders);