r25468 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25467‎ | r25468 | r25469 >
Date:04:13, 4 September 2007
Author:aaron
Status:old
Tags:
Comment:
*Only sanitize IPv6 titles for pages in user namespace.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -1916,9 +1916,13 @@
19171917 $this->mNamespace != NS_MAIN ) {
19181918 return false;
19191919 }
1920 - // Allow IPv6 to start with '::' by expanding it.
1921 - // This trims all input, but that happens anyway.
1922 - $dbkey = IP::sanitizeIP( $dbkey );
 1920+ // Allow IPv6 usernames to start with '::' by canonicalizing IPv6 titles.
 1921+ // IP names are not allowed for accounts, and can only be referring to
 1922+ // edits from the IP. IPv6, given '::' abbreviations and caps/lowercaps,
 1923+ // there are numerous ways to present the same IP. Having sp:contribs scan
 1924+ // them all is silly and having some show the edits and others not is
 1925+ // inconsistent. Keep them normalized instead.
 1926+ $dbkey = $this->mNamespace == NS_USER ? IP::sanitizeIP( $dbkey ) : $dbkey;
19231927 // Any remaining initial :s are illegal.
19241928 if ( $dbkey !== '' && ':' == $dbkey{0} ) {
19251929 return false;

Follow-up revisions

RevisionCommit summaryAuthorDate
r25530Merged revisions 25454-25529 via svnmerge from...david08:28, 5 September 2007

Status & tagging log