浏览代码

RFC 3676 says there can't be more in the signature delimiter line than this

pdontthink 15 年之前
父节点
当前提交
d60c5d4937
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/compose.php

+ 1 - 1
src/compose.php

@@ -980,7 +980,7 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se
                 $body = '';
                 $body = '';
                 $strip_sigs = getPref($data_dir, $username, 'strip_sigs');
                 $strip_sigs = getPref($data_dir, $username, 'strip_sigs');
                 foreach ($rewrap_body as $line) {
                 foreach ($rewrap_body as $line) {
-                    if ($strip_sigs && substr($line,0,3) == '-- ') {
+                    if ($strip_sigs && rtrim($line, "\r\n") == '-- ') {
                         break;
                         break;
                     }
                     }
                     if (preg_match("/^(>+)/", $line, $matches)) {
                     if (preg_match("/^(>+)/", $line, $matches)) {