r62973 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62972‎ | r62973 | r62974 >
Date:20:29, 25 February 2010
Author:maxsem
Status:ok
Tags:
Comment:
Backported r62967 and r62968 to 1.16: (bug 17790) Users instantly logged off on HughesNet
Modified paths:
  • /branches/REL1_16/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_16/phase3/includes/specials/SpecialUserlogout.php (modified) (history)
  • /branches/REL1_16/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /branches/REL1_16/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: branches/REL1_16/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: branches/REL1_16/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+ if ( isset( $_SERVER['REQUEST_URI'] ) && strpos( $_SERVER['REQUEST_URI'], '&' ) !== false ) {
 19+ wfDebug( "Special:Userlogout request {$_SERVER['REQUEST_URI']} looks suspicious, denying.\n" );
 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: branches/REL1_16/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',
Index: branches/REL1_16/phase3/RELEASE-NOTES
@@ -759,6 +759,7 @@
760760 * (bug 22551) Special:Resetpass now has a "Cancel" button that sends the user to
761761 the page set in the &returnto parameter.
762762 * (bug 19194) Search box in Modern skin doesn't focus with Safari/Chrome
 763+* (bug 17790) Users instantly logged off on HughesNet
763764
764765 == API changes in 1.16 ==
765766

Follow-up revisions

RevisionCommit summaryAuthorDate
r86182Prevent bug 17790 from reappearing on Special:Preferencesmaxsem07:39, 16 April 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r62967(bug 17790) Users instantly logged off on HughesNetmaxsem17:44, 25 February 2010
r62968fix debug logging from r62967maxsem17:50, 25 February 2010

Status & tagging log