| Index: trunk/phase3/includes/SpecialContributions.php |
| — | — | @@ -76,6 +76,9 @@ |
| 77 | 77 | if( substr( $this->username, -2 ) == 24 ) $ipmask = $abcd[0] . '.' . $abcd[1] . '.' . $abcd[2] . '.%'; |
| 78 | 78 | else $ipmask=$abcd[0] . '.' . $abcd[1] . '.%'; |
| 79 | 79 | $condition = 'rev_user_text LIKE ' . $this->dbr->addQuotes($ipmask); |
| | 80 | + } else if ( IP::isIPv6( $this->username ) ) { |
| | 81 | + # All stored IPs should be sanitized from now on, check for exact matches for reverse compatibility |
| | 82 | + $condition = '(rev_user_text=' . $this->dbr->addQuotes(IP::sanitizeIP($this->username)) . ' OR rev_user_text=' . $this->dbr->addQuotes($this->username) . ')'; |
| 80 | 83 | } |
| 81 | 84 | |
| 82 | 85 | if ( $condition == '' ) { |