capitalize filename so that wikis with $wgCapitalLinks=false can access
[lhc/web/wiklou.git] / includes / SpecialUserlogin.php
index 90b7311..89eedcb 100644 (file)
@@ -87,7 +87,7 @@ class LoginForm {
                global $wgOut;
                
                if ('' == $this->mEmail) {
-                       $this->mainLoginForm( wfMsg( 'noemail', $this->mName ) );
+                       $this->mainLoginForm( wfMsg( 'noemail', htmlspecialchars( $this->mName ) ) );
                        return;
                }
 
@@ -238,7 +238,6 @@ class LoginForm {
                #
                if ( $this->mRemember ) {
                        $r = 1;
-                       $u->setCookiePassword( $this->mPassword );
                } else {
                        $r = 0;
                }
@@ -305,7 +304,7 @@ class LoginForm {
                $np = User::randomPassword();
                $u->setNewpassword( $np );
 
-               setcookie( $wgDBname.'Password', '', time() - 3600, $wgCookiePath, $wgCookieDomain );
+               setcookie( "{$wgDBname}Token", '', time() - 3600, $wgCookiePath, $wgCookieDomain );
                $u->saveSettings();
 
                $ip = $wgIP;
@@ -314,8 +313,8 @@ class LoginForm {
                $m = wfMsg( 'passwordremindertext', $ip, $u->getName(), $np );
 
                $error = userMailer( $u->getEmail(), $wgPasswordSender, wfMsg( 'passwordremindertitle' ), $m );
-                 
-               return $error;
+               
+               return htmlspecialchars( $error );
        }
 
 
@@ -372,7 +371,7 @@ class LoginForm {
                $mmp = wfMsg( 'mailmypassword' );
                $endText = wfMsg( 'loginend' );
 
-               if ( $endText = '<loginend>' ) {
+               if ( $endText == '<loginend>' ) {
                        $endText = '';
                }