Index: trunk/phase3/includes/IP.php |
— | — | @@ -22,7 +22,12 @@ |
23 | 23 | define( 'RE_IPV6_ADD', '(:(:' . RE_IPV6_WORD . '){1,7}|' . RE_IPV6_WORD . '(:{1,2}' . RE_IPV6_WORD . '|::$){1,7})' ); |
24 | 24 | define( 'RE_IPV6_BLOCK', RE_IPV6_ADD . '\/' . RE_IPV6_PREFIX ); |
25 | 25 | // This might be useful for regexps used elsewhere, matches any IPv6 or IPv6 address or network |
26 | | -define( 'IP_ADDRESS_STRING', RE_IP_ADD . '(\/' . RE_IP_PREFIX . '|)|' . RE_IPV6_ADD . '(\/' . RE_IPV6_PREFIX . '|)'); |
| 26 | +define( 'IP_ADDRESS_STRING', |
| 27 | + '(?:' . |
| 28 | + RE_IP_ADD . '(\/' . RE_IP_PREFIX . '|)' . |
| 29 | + '|' . |
| 30 | + RE_IPV6_ADD . '(\/' . RE_IPV6_PREFIX . '|)' . |
| 31 | + ')' ); |
27 | 32 | |
28 | 33 | /** |
29 | 34 | * A collection of public static functions to play with IP address |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -163,6 +163,7 @@ |
164 | 164 | * (bug 9679) Improve documentation for $wgSiteNotice |
165 | 165 | * (bug 10215) Show custom editing introduction when editing existing pages |
166 | 166 | * (bug 10223) Fix edit link in noarticletext localizations for fr, oc |
| 167 | +* (bug 10247) Fix IP address regex to avoid false positive IPv6 matches |
167 | 168 | |
168 | 169 | |
169 | 170 | == API changes since 1.10 == |