php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46884 Options are not checked in /ext/imap
Submitted: 2008-12-16 17:26 UTC Modified: 2009-05-01 21:27 UTC
From: zoe@php.net Assigned: zoe (profile)
Status: Closed Package: IMAP related
PHP Version: 5.3.0alpha3 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zoe@php.net
New email:
PHP Version: OS:

 

 [2008-12-16 17:26 UTC] zoe@php.net
Description:
------------
This is essentially the same problem as described in #46731 and #46837.
The values of options passed to imap functions are not checked precisely.

Patches for:
imap_body(),imap_fetchstructure(),imap_fetchbody(),imap_fetchheader()

Are here:
http://www.pastebin.ca/1286942
http://www.pastebin.ca/1286943
http://www.pastebin.ca/1286944


I have also fixed missing initialisation of flags in fetchheader() in PHP53 and PHP6.


Reproduce code:
---------------
Test cases here

http://www.pastebin.ca/1286945
http://www.pastebin.ca/1286947
http://www.pastebin.ca/1286948
http://www.pastebin.ca/1286949

Expected result:
----------------
As shown in test cases

Actual result:
--------------
PHP_INT_MAX is accepted as a valid option.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-16 21:05 UTC] zoe@php.net
assigning to myself after discussion with ilia
 [2008-12-16 21:13 UTC] zoe@php.net
fixed
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 17:01:28 2025 UTC