Skip to content

Commit

Permalink
Pushover/Quarantine utf 8 fix - fixes #6028 (#6031)
Browse files Browse the repository at this point in the history
* Decode rspamd-subject for pushover notifications

Fixes #6028

* Apply iconv_mime_decode to the quarantine function as well
This might contain utf-8 encoded text as well

* Moved the iconv_mime_decode "fix" back to pipe.php
  • Loading branch information
bluewalk committed Aug 20, 2024
1 parent f9a7712 commit 567ebbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data/conf/rspamd/meta_exporter/pipe.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function getallheaders() {

$qid = $headers['X-Rspamd-Qid'];
$fuzzy = $headers['X-Rspamd-Fuzzy'];
$subject = $headers['X-Rspamd-Subject'];
$subject = iconv_mime_decode($headers['X-Rspamd-Subject']);
$score = $headers['X-Rspamd-Score'];
$rcpts = $headers['X-Rspamd-Rcpt'];
$user = $headers['X-Rspamd-User'];
Expand Down
2 changes: 1 addition & 1 deletion data/conf/rspamd/meta_exporter/pushover.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function getallheaders() {
$rcpts = $headers['X-Rspamd-Rcpt'];
$sender = $headers['X-Rspamd-From'];
$ip = $headers['X-Rspamd-Ip'];
$subject = $headers['X-Rspamd-Subject'];
$subject = iconv_mime_decode($headers['X-Rspamd-Subject']);
$messageid= $json_body->message_id;
$priority = 0;

Expand Down

0 comments on commit 567ebbc

Please sign in to comment.