Bug #51725 [PATCH]: xmlrpc_get_type() returns true on invalid dates
| From: | mike@php.net | Date: | Wed, 12 May 2010 09:36:22 +0000 |
| Subject: | Bug #51725 [PATCH]: xmlrpc_get_type() returns true on invalid dates | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150381@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51725&edit=1
ID: 51725
Patch added by: mike@php.net
Reported by: geissert@php.net
Summary: xmlrpc_get_type() returns true on invalid dates
Status: Verified
Type: Bug
Package: XMLRPC-EPI related
Operating System: linux/kfreebsd ia64/x86_64
PHP Version: 5.3.2
New Comment:
The following patch has been added/updated:
Patch Name: php_parse_date-return-on-parse-error
Revision: 1273656982
URL:
http://bugs.php.net/patch-display.php?bug=51725&patch=php_parse_date-return-on-parse-error&revision=1273656982
Previous Comments:
------------------------------------------------------------------------
[2010-05-12 11:11:53] mike@php.net
The following patch has been added/updated:
Patch Name: php_parse_date-return-on-parse-error
Revision: 1273655513
URL:
http://bugs.php.net/patch-display.php?bug=51725&patch=php_parse_date-return-on-parse-error&revision=1273655513
------------------------------------------------------------------------
[2010-05-03 15:32:16] iliaa@php.net
IT happens on 64bit systems only. The reason has to do with date
extension, which
is used to validate the date string (on 64 bit machines this results in
a very
small negative #), not -1 and thus passed validation.
------------------------------------------------------------------------
[2010-05-03 14:23:18] felipe@php.net
(I tested on 32bit though)
------------------------------------------------------------------------
[2010-05-03 14:20:36] felipe@php.net
I cannot reproduce it on Linux using:
libexpat1-dev --- 2.0.1-4+lenny3
libxml2-dev --- 2.7.3.dfsg-2.1
------------------------------------------------------------------------
[2010-05-03 05:40:35] geissert@php.net
Description:
------------
ext/xmlrpc/tests/bug42189.phpt fails consistently on 64 bits
architectures such as ia64 and x86_64.
I modified the test a bit to show what's going on. From a quick look at
the code it appears to be a bug in the XMLRPC-EPI lib and not in the
module itself.
Test script:
---------------
<?php
$a = '~~~~~~~~~~~~~~~~~~';
$ok = xmlrpc_set_type($a, 'datetime');
var_dump($ok);
if ($ok)
echo xmlrpc_encode($a);
echo "Done\n";
?>
Expected result:
----------------
bool(false)
Done
Actual result:
--------------
bool(true)
<?xml version="1.0" encoding="utf-8"?>
<params>
<param>
<value>
<dateTime.iso8601>~~~~~~~~~~~~~~~~~~</dateTime.iso8601>
</value>
</param>
</params>
Done
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51725&edit=1