|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-11-17 06:04 UTC] s dot masugata at digicom dot dnp dot co dot jp
Description:
------------
Length of the encoded character string violates a RFC.
It violates a RFC when encoding a character string using the mb_encode_mimeheader function.
As for the e-mail header, the total of the field identifier, the field value and the line feed character is defined as being less than 76 characters.
It processes mb_encode_mimeheader function only using the field value.
Therefore, the field length at the head violates a RFC.
Reproduce code:
---------------
<?php
declare( encoding="EUC-JP" );
$A = "??????????????????????????????????????????????????".
"??????????????????????????????????????";
$encode = mb_encode_mimeheader( $A, "EUC-JP", "B" );
mail ( "s.masugata@digicom.dnp.co.jp", $encode, "TEST" );
?>
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 07:00:01 2025 UTC |
Thank you for reply. :) Sorry, Mistaking by the sample scripts to have been specified by me of. it's as the following: <?php declare( encoding="EUC-JP" ); $A = "??????????????????????????????????????????????". "??????????????????????????????????????????????"; $encode = mb_encode_mimeheader( $A, "EUC-JP", "B" ); $Cc = "Cc: ".$encode." <s.masugata@digicom.dnp.co.jp>"; mail( "s.masugata@digicom.dnp.co.jp", "TEST Subject", "TEST Body", $Cc ); ?> Cc: =?EUC-JP?B?pKKkoqSipKKkoqSipKKkoqSipKKkoqSipKKkoqSipKKkoqSipKKkoqSipKI=?= =?EUC-JP?B?pKKkoqSipKKkoqSipKKkoqSipKKkoqSipKKkoqSipKKkoqSipKKkoqSipKI=?= =?EUC-JP?B?pKKkog==?= <s.masugata@digicom.dnp.co.jp> Because it doesn't consider a field identifier "Cc: " about the mb_encode_mimeheader function, the field length at the head exceeds 76 characters. It found the patch which solves this problem. http://www.geocities.jp/rui_hirokawa/php/patch/php4_mb_mime_offset.patch.txt Please committing, I'm happy. :) rui knows details.