소스 검색

Fixed bug that ignored lowercase quoted printable in headers.

gustavf 25 년 전
부모
커밋
1485f5dc0b
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      functions/mime.php

+ 5 - 0
functions/mime.php

@@ -525,6 +525,11 @@
             $replace = base64_decode($res[3]);
          } else {
             $replace = ereg_replace("_", " ", $res[3]);
+	    // Convert lowercase Quoted Printable to uppercase for
+	    // quoted_printable_decode to understand it.
+	    while (ereg("(=([0-9][a-f])|([a-f][0-9]))", $replace, $res)) {
+	       $replace = str_replace($res[1], strtoupper($res[1]), $replace);
+	    }
             $replace = quoted_printable_decode($replace);
          }