CRLF issue fixes

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2023-06-02 15:29:13 +02:00
parent 001453cef6
commit 28dcd0cc25
2 changed files with 3 additions and 5 deletions

View File

@ -71,8 +71,6 @@ class ModelSearchMessage extends Model {
$this->verification = $this->verify_message($id, $s);
}
$s = $this->normalize_message($s);
if(Registry::get('auditor_user') == 0 && HEADER_LINE_TO_HIDE) {
$s = preg_replace("/" . HEADER_LINE_TO_HIDE . ".{1,}(\n(\ |\t){1,}.{1,}){0,}" . "\n/i", "", $s);
}

View File

@ -53,7 +53,7 @@ class Piler_Mime_Decode {
$start = 0;
$res = array();
$body = self::remove_LF($body);
$body = self::remove_CR($body);
// Extract the mime parts excluding the boundary itself
@ -96,7 +96,7 @@ class Piler_Mime_Decode {
$headers = [];
$body = '';
$message = self::remove_LF($message);
$message = self::remove_CR($message);
// Find an empty line between headers and body, otherwise we got a header-only message
@ -289,7 +289,7 @@ class Piler_Mime_Decode {
}
public static function remove_LF($message = '') {
public static function remove_CR($message = '') {
return str_replace("\r", "", $message);
//return preg_replace("/\r/", "", $message);
}