(bug 17790) Users instantly logged off on HughesNet
authorMax Semenik <maxsem@users.mediawiki.org>
Thu, 25 Feb 2010 17:44:43 +0000 (17:44 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Thu, 25 Feb 2010 17:44:43 +0000 (17:44 +0000)
HISTORY
includes/specials/SpecialUserlogout.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

diff --git a/HISTORY b/HISTORY
index 8cd36ec..50418cd 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -745,6 +745,7 @@ comment from another wiki.
 * (bug 22551) Special:Resetpass now has a "Cancel" button that sends the user to 
   the page set in the &returnto parameter.
 * (bug 19194) Search box in Modern skin doesn't focus with Safari/Chrome
+* (bug 17790) Users instantly logged off on HughesNet
 
 == API changes in 1.16 ==
 
index 3d497bd..28f8a5e 100644 (file)
 function wfSpecialUserlogout() {
        global $wgUser, $wgOut;
 
+       /**
+        * Some satellite ISPs use broken precaching schemes that log people out straight after
+        * they're logged in (bug 17790). Luckily, there's a way to detect such requests.
+        */
+       wfDebug( $_SERVER['REQUEST_URI'] . "\n" );
+       if ( isset( $_SERVER['REQUEST_URI'] ) && strpos( $_SERVER['REQUEST_URI'], '&amp;' ) !== false ) {
+               wfHttpError( 400, wfMsg( 'loginerror' ), wfMsg( 'suspicious-userlogout' ) );
+               return;
+       }
+       
        $oldName = $wgUser->getName();
        $wgUser->logout();
        $wgOut->setRobotPolicy( 'noindex,nofollow' );
index dc1d6a6..55be5c9 100644 (file)
@@ -1134,6 +1134,7 @@ Please wait before trying again.',
 * EspaƱol|es
 * Italiano|it
 * Nederlands|nl', # do not translate or duplicate this message to other languages
+'suspicious-userlogout'     => 'Your request to log out was denied because it looks like it was sent by a broken browser or caching proxy.',
 
 # Password reset dialog
 'resetpass'                 => 'Change password',
index d199ba2..0e39a51 100644 (file)
@@ -465,6 +465,7 @@ $wgMessageStructure = array(
                'login-throttled',
                'loginlanguagelabel',
                'loginlanguagelinks',
+               'suspicious-userlogout',
        ),
        'resetpass' => array(
                'resetpass',