Bug #37554

Http\Uri::PATTERN_MATCH_HOST has errors

Added by Pankaj Lele about 3 years ago. Updated about 3 years ago.

Status:Resolved Start date:2012-05-28
Priority:Should have Due date:
Assigned To:Adrian Föder % Done:

100%

Category:Http
Target version:-
PHP Version:5.3 Complexity:
Has patch:No Affected Flow version:FLOW3 1.1.0 beta 1

Description

<?php
$ret = preg_match('/^[a-zA-Z0-9_~!&\',;=\.\-\$\(\)\*\+]|(?:%[0-9a-fA-F]{2}))*$/', 'www.example.com', $matches);
?>

Produces error "PHP Warning: preg_match(): Compilation failed: unmatched parentheses at offset 54"

Associated revisions

Revision 9b047552
Added by Adrian Föder about 3 years ago

[BUGFIX] Corrected "Uri host" regular expression

The regular expression verifying the validity of
a host name in Uri's setHost method was of an incorrect
syntax leading to a PHP error message.
Besides correcting that, this patch adds a Test to
proof the intended functionality.

Change-Id: Ic41ef0dec4ac2b783a78e0723ca40e7c66bcb11f
Fixes: #37554
Releases: 1.1, 1.2

Revision 4257faeb
Added by Adrian Föder about 3 years ago

[BUGFIX] Corrected "Uri host" regular expression

The regular expression verifying the validity of
a host name in Uri's setHost method was of an incorrect
syntax leading to a PHP error message.
Besides correcting that, this patch adds a Test to
proof the intended functionality.

Change-Id: Ic41ef0dec4ac2b783a78e0723ca40e7c66bcb11f
Fixes: #37554
Releases: 1.1, 1.2

History

#1 Updated by Karsten Dambekalns about 3 years ago

  • Status changed from New to Accepted
  • Assigned To changed from Robert Lemke to Adrian Föder

#2 Updated by Gerrit Code Review about 3 years ago

  • Status changed from Accepted to Under Review

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11838

#3 Updated by Gerrit Code Review about 3 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11838

#4 Updated by Gerrit Code Review about 3 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11838

#5 Updated by Gerrit Code Review about 3 years ago

Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/12169

#6 Updated by Adrian Föder about 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF