r50062 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50061‎ | r50062 | r50063 >
Date:05:21, 30 April 2009
Author:tstarling
Status:deferred
Tags:
Comment:
Sanitize cleanCallback on wakeup. Extra security check for APIs like SecurePoll/auth-api.php.
Modified paths:
  • /trunk/phase3/includes/Status.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Status.php
@@ -84,6 +84,13 @@
8585 $this->ok = false;
8686 }
8787
 88+ /**
 89+ * Sanitize the callback parameter on wakeup, to avoid arbitrary execution.
 90+ */
 91+ function __wakeup() {
 92+ $this->cleanCallback = false;
 93+ }
 94+
8895 protected function cleanParams( $params ) {
8996 if ( !$this->cleanCallback ) {
9097 return $params;

Status & tagging log