php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43903 imap_fetchbody() dorst not eork properly
Submitted: 2008-01-21 09:21 UTC Modified: 2008-01-28 23:14 UTC
From: reports at vishnivetsky dot ru Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 4.4.8 OS: Linux plesk.rtcomm-sibir.ru 2.6.
Private report: No CVE-ID: None
 [2008-01-21 09:21 UTC] reports at vishnivetsky dot ru
Description:
------------
The problem is whet I try to fetch message with following structure:

MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----------636F494B2165"

------------636F494B2165
Content-Type: text/plain; charset=windows-1251
Content-Transfer-Encoding: 8bit

Here comes plain text with cyrillic characters. 


sd
fsd
f
sdf
s
df
sdf
sf
s
ылвоарлорпл

------------636F494B2165
Content-Type: application/octet-stream;
 name="vssver.scc"
Content-transfer-encoding: base64
Content-Disposition: attachment;
 filename="vssver.scc"

NBIBADCSAGDjY9URiUMAkCdir0j+oz57LigBAAAAAACQ0QEAUdL+w7xrBRUCAAAA

------------636F494B2165--

So when I try to call imap_fetchbody() with partid = 1 (where plain text is) I returns an empty string some times.
I have tested this operation on messages, that differs only by length of TEXT/PLAIN part and presence of cyrrilic characters.
So when length is more then 50-100 bytes and we have cyrillic characters in the end of this part the imap_fetchbody() returns en empty string.

Reproduce code:
---------------
imap_fetchbody( $mbox, ($HTTP_GET_VARS['msgid']+0), ($HTTP_GET_VARS['partid']), FT_PEEK || FT_UID )

Expected result:
----------------
Here comes plain text with cyrillic characters. 


sd
fsd
f
sdf
s
df
sdf
sf
s
ылвоарлорпл


Actual result:
--------------
<an empty string>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-28 23:14 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Please IMAP c-client bugs to its authors.
Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 01:01:30 2024 UTC