(bug 27021) Session key was changed somewhere from an int to a string, which broke...
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Sat, 29 Jan 2011 21:42:03 +0000 (21:42 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Sat, 29 Jan 2011 21:42:03 +0000 (21:42 +0000)
Note that this also may break API clients in certain cases for strongly, statically typed languages (e.g. int sessionKey = request->sessionKey;). I see no way around this, so I will announce a breaking change on the API mailing list shortly.

includes/upload/UploadFromStash.php

index 23957bb..7f0f92e 100644 (file)
@@ -19,7 +19,7 @@ class UploadFromStash extends UploadBase {
        public static function isValidRequest( $request ) {
                $sessionData = $request->getSessionData( UploadBase::SESSION_KEYNAME );
                return self::isValidSessionKey(
-                       $request->getInt( 'wpSessionKey' ),
+                       $request->getText( 'wpSessionKey' ),
                        $sessionData
                );
        }
@@ -46,7 +46,7 @@ class UploadFromStash extends UploadBase {
        }
 
        public function initializeFromRequest( &$request ) {
-               $sessionKey = $request->getInt( 'wpSessionKey' );
+               $sessionKey = $request->getText( 'wpSessionKey' );
                $sessionData = $request->getSessionData( UploadBase::SESSION_KEYNAME );
 
                $desiredDestName = $request->getText( 'wpDestFile' );