r76928 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76927‎ | r76928 | r76929 >
Date:00:25, 18 November 2010
Author:aaron
Status:reverted (Comments)
Tags:
Comment:
(bug 25920) Moved forward ref to a nested ref to really get v6 regex to compile on older PCRE versions
Modified paths:
  • /trunk/phase3/includes/IP.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/IP.php
@@ -42,7 +42,7 @@
4343 '|' . // has no "::"
4444 RE_IPV6_WORD . '(?::' . RE_IPV6_WORD . '){7}' .
4545 '|' . // contains one "::" in the middle (awkward regex for PCRE 4.0+ compatibility)
46 - RE_IPV6_WORD . '(?::(?!(?P=abn))(?P<abn>:(?P<iabn>))?' . RE_IPV6_WORD . '){1,6}(?P=iabn)' .
 46+ RE_IPV6_WORD . '(?::(?P<abn>(?!(?P=abn)):(?P<iabn>))?' . RE_IPV6_WORD . '){1,6}(?P=iabn)' .
4747 // NOTE: (?!(?P=abn)) fails iff "::" used twice; (?P=iabn) passes iff a "::" was found.
4848
4949 // Better regexp (PCRE 7.2+ only), allows intuitive regex concatenation

Follow-up revisions

RevisionCommit summaryAuthorDate
r76938Reverting r76928, causes segfaultreedy02:32, 18 November 2010
r77067*(bug 25920) Moved forward ref to a back ref to really get v6 regex to compil...aaron10:49, 21 November 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76876* Reduced some pointless regex capture overhead...aaron09:12, 17 November 2010

Comments

#Comment by Reedy (talk | contribs)   02:33, 18 November 2010

Reverted/fixme - Causes Apache to segfault

Status & tagging log