When the CSRF token on is not available in the session, show the
authorPlatonides <platonides@users.mediawiki.org>
Thu, 26 Aug 2010 18:28:33 +0000 (18:28 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Thu, 26 Aug 2010 18:28:33 +0000 (18:28 +0000)
'you have cookies disabled' message instead of "Session problem,
canceled to avoid session hijacking"

includes/specials/SpecialUserlogin.php

index 6d074f3..5e41e3f 100644 (file)
@@ -272,7 +272,7 @@ class LoginForm {
                # Request forgery checks.
                if ( !self::getCreateaccountToken() ) {
                        self::setCreateaccountToken();
-                       $this->mainLoginForm( wfMsg( 'sessionfailure' ) );
+                       $this->mainLoginForm( wfMsgExt( 'nocookiesnew', array( 'parseinline' ) ) );;
                        return false;
                }
 
@@ -657,6 +657,8 @@ class LoginForm {
                                break;
 
                        case self::NEED_TOKEN:
+                               $this->mainLoginForm( wfMsgExt( 'nocookieslogin', array( 'parseinline' ) ) );
+                               break;
                        case self::WRONG_TOKEN:
                                $this->mainLoginForm( wfMsg( 'sessionfailure' ) );
                                break;