php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42506 php_pgsql_convert() timezone parse bug
Submitted: 2007-09-01 07:59 UTC Modified: 2007-09-03 15:36 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: nonunnet at gmail dot com Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 5.2.4 OS: *
Private report: No CVE-ID: None
 [2007-09-01 07:59 UTC] nonunnet at gmail dot com
Description:
------------
'2007-01-01 01:01:01 Asia/Seoul'
'2007-01-01 01:01 America/Los_angeles'

regex '[a-zA-Z]{1,5}' cannot parse above strings.
regex change to '[-a-zA-Z_/+]{1,30}'


line 5004 on ext/pgsql/pgsql.c

- if (php_pgsql_convert_match(Z_STRVAL_PP(val), "^([0-9]{4}[/-][0-9]{1,2}[/-][0-9]{1,2})([ \\t]+(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1}(\\.[0-9]+){0,1}([ \\t]*([+-][0-9]{1,2}(:[0-9]{1,2}){0,1}|[a-zA-Z]{1,5})){0,1})){0,1}$", 1 TSRMLS_CC) == FA        ILURE) {

+ if (php_pgsql_convert_match(Z_STRVAL_PP(val), "^([0-9]{4}[/-][0-9]{1,2}[/-][0-9]{1,2})([ \\t]+(([0-9]{1,2}:[0-9]{1,2}){1}(:[0-9]{1,2}){0,1}(\\.[0-9]+){0,1}([ \\t]*([+-][0-9]{1,2}(:[0-9]{1,2}){0,1}|[-a-zA-Z_/+]{1,30})){0,1})){0,1}$", 1 TSRMLS_CC) == FA        ILURE) {




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-03 15:36 UTC] iliaa@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC