r62967 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62966‎ | r62967 | r62968 >
Date:17:44, 25 February 2010
Author:maxsem
Status:ok (Comments)
Tags:
Comment:
(bug 17790) Users instantly logged off on HughesNet
Modified paths:
  • /trunk/phase3/HISTORY (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogout.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -465,6 +465,7 @@
466466 'login-throttled',
467467 'loginlanguagelabel',
468468 'loginlanguagelinks',
 469+ 'suspicious-userlogout',
469470 ),
470471 'resetpass' => array(
471472 'resetpass',
Index: trunk/phase3/HISTORY
@@ -745,6 +745,7 @@
746746 * (bug 22551) Special:Resetpass now has a "Cancel" button that sends the user to
747747 the page set in the &returnto parameter.
748748 * (bug 19194) Search box in Modern skin doesn't focus with Safari/Chrome
 749+* (bug 17790) Users instantly logged off on HughesNet
749750
750751 == API changes in 1.16 ==
751752
Index: trunk/phase3/includes/specials/SpecialUserlogout.php
@@ -10,6 +10,16 @@
1111 function wfSpecialUserlogout() {
1212 global $wgUser, $wgOut;
1313
 14+ /**
 15+ * Some satellite ISPs use broken precaching schemes that log people out straight after
 16+ * they're logged in (bug 17790). Luckily, there's a way to detect such requests.
 17+ */
 18+ wfDebug( $_SERVER['REQUEST_URI'] . "\n" );
 19+ if ( isset( $_SERVER['REQUEST_URI'] ) && strpos( $_SERVER['REQUEST_URI'], '&' ) !== false ) {
 20+ wfHttpError( 400, wfMsg( 'loginerror' ), wfMsg( 'suspicious-userlogout' ) );
 21+ return;
 22+ }
 23+
1424 $oldName = $wgUser->getName();
1525 $wgUser->logout();
1626 $wgOut->setRobotPolicy( 'noindex,nofollow' );
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1134,6 +1134,7 @@
11351135 * Español|es
11361136 * Italiano|it
11371137 * Nederlands|nl', # do not translate or duplicate this message to other languages
 1138+'suspicious-userlogout' => 'Your request to log out was denied because it looks like it was sent by a broken browser or caching proxy.',
11381139
11391140 # Password reset dialog
11401141 'resetpass' => 'Change password',

Follow-up revisions

RevisionCommit summaryAuthorDate
r62968fix debug logging from r62967maxsem17:50, 25 February 2010
r62973Backported r62967 and r62968 to 1.16: (bug 17790) Users instantly logged off ...maxsem20:29, 25 February 2010
r86182Prevent bug 17790 from reappearing on Special:Preferencesmaxsem07:39, 16 April 2011

Comments

#Comment by MaxSem (talk | contribs)   17:45, 25 February 2010

Logged to HISTORY instead of RELEASE-NOTES because I'll backport it to 1.16 shortly.

Status & tagging log