Bug #69465 [Opn]: yaml.decode_timestamp decodes quoted strings

From: Date: Wed, 15 Apr 2015 19:38:55 +0000
Subject: Bug #69465 [Opn]: yaml.decode_timestamp decodes quoted strings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-192114@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69465&edit=1 ID: 69465 User updated by: neclimdul at gmail dot com Reported by: neclimdul at gmail dot com -Summary: FILTER_VALIDATE_URL does not see urls with underscores as valid URLs. +Summary: yaml.decode_timestamp decodes quoted strings Status: Open Type: Bug Package: Filter related Operating System: Ubuntu PHP Version: 5.6.7 Block user comment: N Private report: N New Comment: php.net keeps putting this in the summary... sorry I don't don't what is going on. Previous Comments: ------------------------------------------------------------------------ [2015-04-15 19:37:39] neclimdul at gmail dot com Description: ------------ yaml.decode_timestamp is said to 'Controls the decoding of both implicit and explict "tag:yaml.org,2002:timestamp" scalars.' This seems to be covered by the resolution rules(http://yaml.org/spec/1.1/current.html#id866224) However this settings decodes all scalars which is not recommended. (http://yaml.org/spec/1.1/current.html#id866262). Nodes have “!” non-specific tag shouldn't be resolved. Quoted tags are documented as being treated the same way Test script: --------------- <?php ini_set('yaml.decode_timestamp', 1); var_dump(yaml_parse(' date1: 2015-05-15 date2: "2015-05-15" date3: ! 2015-05-15 ')); Expected result: ---------------- array(3) { ["date"]=> int(1431666000) ["date2"]=> string(10) "2015-05-15" ["date3"]=> string(10) "2015-05-15" } Actual result: -------------- array(3) { ["date"]=> int(1431666000) ["date2"]=> int(1431666000) ["date3"]=> int(1431666000) } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69465&edit=1

« previous php.bugs (#192114) next »