Bug #37554

Http\Uri::PATTERN_MATCH_HOST has errors

Added by Pankaj Lele 12 months ago. Updated 11 months ago.

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

100%

Category:Http
Target version:-
PHP Version:5.3 Complexity:
Has patch:No FLOW3 version affected:FLOW3 1.1.0 beta 1
Votes: 0

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 4257faeb
Added by Adrian Föder 11 months 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

Updated by Karsten Dambekalns 12 months ago

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

Updated by Gerrit Code Review 12 months 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

Updated by Gerrit Code Review 12 months ago

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

Updated by Gerrit Code Review 12 months ago

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

Updated by Gerrit Code Review 11 months 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

Updated by Adrian Föder 11 months ago

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

Also available in: Atom PDF