Browse Source

Quarantine release - fix when sender is empty (#3445)

Signed-off-by: Kristián Feldsam <feldsam@gmail.com>
Kristian Feldsam 5 years ago
parent
commit
1e2bcfb946
1 changed files with 2 additions and 2 deletions
  1. 2 2
      data/web/inc/functions.quarantine.inc.php

+ 2 - 2
data/web/inc/functions.quarantine.inc.php

@@ -81,7 +81,7 @@ function quarantine($_action, $_data = null) {
         $stmt = $pdo->prepare('SELECT `msg`, `qid`, `sender`, `rcpt` FROM `quarantine` WHERE `id` = :id');
         $stmt = $pdo->prepare('SELECT `msg`, `qid`, `sender`, `rcpt` FROM `quarantine` WHERE `id` = :id');
         $stmt->execute(array(':id' => $row['id']));
         $stmt->execute(array(':id' => $row['id']));
         $detail_row = $stmt->fetch(PDO::FETCH_ASSOC);
         $detail_row = $stmt->fetch(PDO::FETCH_ASSOC);
-        $sender = (isset($detail_row['sender'])) ? $detail_row['sender'] : 'sender-unknown@rspamd';
+        $sender = !empty($detail_row['sender']) ? $detail_row['sender'] : 'sender-unknown@rspamd';
         if (!empty(gethostbynamel('postfix-mailcow'))) {
         if (!empty(gethostbynamel('postfix-mailcow'))) {
           $postfix = 'postfix-mailcow';
           $postfix = 'postfix-mailcow';
         }
         }
@@ -368,7 +368,7 @@ function quarantine($_action, $_data = null) {
             );
             );
             continue;
             continue;
           }
           }
-          $sender = (isset($row['sender'])) ? $row['sender'] : 'sender-unknown@rspamd';
+          $sender = !empty($row['sender']) ? $row['sender'] : 'sender-unknown@rspamd';
           if (!empty(gethostbynamel('postfix-mailcow'))) {
           if (!empty(gethostbynamel('postfix-mailcow'))) {
             $postfix = 'postfix-mailcow';
             $postfix = 'postfix-mailcow';
           }
           }