[Web] Fix Rspamd symbols in quarantine overview

master
andryyy 2020-12-03 16:43:09 +01:00
parent 6f6f52f380
commit da3fc31500
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ if (!empty($_GET['hash']) && ctype_alnum($_GET['hash'])) {
$data['symbols'] = json_decode($mailc['symbols']); $data['symbols'] = json_decode($mailc['symbols']);
// Get fuzzy hashes // Get fuzzy hashes
$data['fuzzy_hashes'] = json_decode($mailc['fuzzy_hashes']); $data['fuzzy_hashes'] = json_decode($mailc['fuzzy_hashes']);
$data['subject'] = $mail_parser->getHeader('subject'); $data['subject'] = mb_convert_encoding($mail_parser->getHeader('subject'), "UTF-8", "auto");
(empty($data['subject'])) ? $data['subject'] = '-' : null; (empty($data['subject'])) ? $data['subject'] = '-' : null;
echo json_encode($data); echo json_encode($data);
} }
@ -139,6 +139,7 @@ elseif (!empty($_GET['id']) && ctype_alnum($_GET['id'])) {
(empty($data['text_plain'])) ? $data['text_plain'] = '-' : null; (empty($data['text_plain'])) ? $data['text_plain'] = '-' : null;
// Get subject // Get subject
$data['subject'] = $mail_parser->getHeader('subject'); $data['subject'] = $mail_parser->getHeader('subject');
$data['subject'] = mb_convert_encoding($mail_parser->getHeader('subject'), "UTF-8", "auto");
(empty($data['subject'])) ? $data['subject'] = '-' : null; (empty($data['subject'])) ? $data['subject'] = '-' : null;
// Get attachments // Get attachments
if (is_dir($tmpdir)) { if (is_dir($tmpdir)) {
@ -196,7 +197,6 @@ elseif (!empty($_GET['id']) && ctype_alnum($_GET['id'])) {
exit; exit;
} }
} }
$data = mb_convert_encoding($data, "UTF-8", "auto");
echo json_encode($data); echo json_encode($data);
} }