* (bug 4436) Update for Turkish language (tr)
* (bug 4413) Update of Farsi language file (LanguageFa.php)
* Update for LanguageSr (Serbian): magic words
-
+* (bug 4371) Disallow tilde character in signatures
=== Caveats ===
$needRedirect = false;
}
+ if( $this->badNickname() ) {
+ $this->mainPrefsForm( 'error', wfMsg( 'badsig2' ) );
+ return;
+ }
+
$wgUser->setOption( 'language', $this->mUserLanguage );
$wgUser->setOption( 'variant', $this->mUserVariant );
$wgUser->setOption( 'nickname', $this->mNick );
}
}
}
+
+ /**
+ * @access private
+ */
+ function badNickname() {
+ $search = array( '/~~~/', '/~~~~/', '/~~~~~/', '/{{/', '/}}/' );
+ foreach( $search as $item ) {
+ if( preg_match( $item, $this->mNick ) > 0 ) {
+ return( true ); # We found a reserved expression
+ }
+ }
+ return( false );
+ }
/**
* @access private
'yourvariant' => 'Variant',
'yournick' => 'Nickname:',
'badsig' => 'Invalid raw signature; check HTML tags.',
+'badsig2' => 'Your signature contains one or more reserved expressions; please remove them.',
'email' => 'E-mail',
'emailforlost' => '<div style="width:30em">* Optional. An e-mail lets others contact you on this site without revealing your address, and lets us send you a new password if you forget it.<br /><br />Your real name will be used to give you attribution for your work.</div>',
'prefs-help-email-enotif' => 'This address is also used to send you e-mail notifications if you enabled the options.',