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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nonunnet at gmail dot com
New email:
PHP Version: OS:

 

 [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: Sat Nov 23 08:01:28 2024 UTC