mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 08:00:12 +01:00
CRLF issue fixes
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
001453cef6
commit
28dcd0cc25
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user