Skip to content

Commit

Permalink
[FIX] block_list page: reviewing unblock and block actions
Browse files Browse the repository at this point in the history
  • Loading branch information
christer77 committed Aug 30, 2024
1 parent 18dc913 commit e0212e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/sievefilters/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public function process() {
$unblock_sender = false;
if ($current_script != '') {
$base64_obj = str_replace("# ", "", preg_split('#\r?\n#', $current_script, 0)[1]);
$blocked_list = json_decode(base64_decode($base64_obj));
$blocked_list = json_decode(str_replace("*", "", base64_decode($base64_obj)));
foreach ($blocked_list as $blocked_sender) {
if ($blocked_sender != $email_sender) {
$blocked_senders[] = $blocked_sender;
Expand Down Expand Up @@ -439,7 +439,7 @@ public function process() {
*/
class Hm_Handler_sieve_block_unblock_script extends Hm_Handler_Module {
public function process() {
list($success, $form) = $this->process_form(array('imap_server_id', 'block_action', 'scope'));
list($success, $form) = $this->process_form(array('imap_server_id', 'block_action', 'scope', 'imap_msg_uid'));

if (!$success) {
return;
Expand All @@ -462,7 +462,7 @@ public function process() {
Hm_Msgs::add('ERRIMAP Mailbox select error');
return;
}
$msg_header = $imap->get_message_headers($form['imap_msg_uid']);
$msg_header = $imap->get_message_headers($this->request->post['imap_msg_uid']);
$test_pattern = "/(?:[a-z0-9!#$%&'*+=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+=?^_`{|}~-]+)*|\"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/";
preg_match_all($test_pattern, $msg_header['From'], $email_sender);
$email_sender = $email_sender[0][0];
Expand Down

0 comments on commit e0212e7

Please sign in to comment.