r73518 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73517‎ | r73518 | r73519 >
Date:12:30, 22 September 2010
Author:catrope
Status:deferred
Tags:
Comment:
SimpleSurvey: Set up a session before putting a token in $_SESSION. This fixes breakage in cases where an anon without a session cookie submits the survey.
Modified paths:
  • /trunk/extensions/SimpleSurvey/SpecialSimpleSurvey.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SimpleSurvey/SpecialSimpleSurvey.php
@@ -36,6 +36,7 @@
3737
3838 public function setToken() {
3939 $this->tokenToCheck = wfGenerateToken( array( $this, time() ) );
 40+ wfSetupSession();
4041 $_SESSION['wsSimpleSurveyToken'] = $this->tokenToCheck;
4142 }
4243

Status & tagging log