#46731 [Opn-Csd]: Imap FT_UID handling problem

2008-12-05 Thread zoe dot slattery at googlemail dot com
 ID:   46731
 User updated by:  zoe dot slattery at googlemail dot com
 Reported By:  zoe dot slattery at googlemail dot com
-Status:   Open
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.3CVS-2008-12-02 (snap)
 Assigned To:  zoe
 New Comment:

Fixed in PHP5.2, PHP5.3 and PHP6


Previous Comments:


[2008-12-03 15:16:47] zoe dot slattery at googlemail dot com

Ilia - thanks but your fix doesn't fix it :-).

Your fix will pass any number as long as it ends in a 1, and warn on
any non-zero number that ends in a zero.

The fix I suggested will warn about any number that isn't either 0 or 1
(FT_UID). These are the only valid values.



[2008-12-03 01:04:40] [EMAIL PROTECTED]

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.





[2008-12-02 16:04:17] zoe dot slattery at googlemail dot com

Description:

In imap_fetch_overview() the FT_UID parameter is treated as a bitmap.
This means that giving it completely invalid parameters for FT_UID does
not cause an error.

Suggested fix to imap_fetch_overview() is here:
http://pastebin.com/m750e3ed2



Reproduce code:
---
To run this you would need the imap_include.inc file that is in
~ext/imap/tests.

http://pastebin.com/m4da53733


Expected result:

From this code I'd expect two successful fetches followed by two
failures.


Actual result:
--
Four successful fetches, PHP_INT_MAX and PHP_INT_MAX-1 are interpreted
as 1 and 0 respectively.





-- 
Edit this bug report at http://bugs.php.net/?id=46731edit=1



#46731 [Opn-Csd]: Imap FT_UID handling problem

2008-12-02 Thread iliaa
 ID:   46731
 Updated by:   [EMAIL PROTECTED]
 Reported By:  zoe dot slattery at googlemail dot com
-Status:   Open
+Status:   Closed
 Bug Type: Scripting Engine problem
 Operating System: Linux
 PHP Version:  5.3CVS-2008-12-02 (snap)
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:


[2008-12-02 16:04:17] zoe dot slattery at googlemail dot com

Description:

In imap_fetch_overview() the FT_UID parameter is treated as a bitmap.
This means that giving it completely invalid parameters for FT_UID does
not cause an error.

Suggested fix to imap_fetch_overview() is here:
http://pastebin.com/m750e3ed2



Reproduce code:
---
To run this you would need the imap_include.inc file that is in
~ext/imap/tests.

http://pastebin.com/m4da53733


Expected result:

From this code I'd expect two successful fetches followed by two
failures.


Actual result:
--
Four successful fetches, PHP_INT_MAX and PHP_INT_MAX-1 are interpreted
as 1 and 0 respectively.





-- 
Edit this bug report at http://bugs.php.net/?id=46731edit=1