blob: 7b868a82ffb4601fa9a78c2bae56a24e08ecb35c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
Description: fix warning on upload page
Bug: https://phabricator.wikimedia.org/T122487
Index: mediawiki-1.23.13/includes/User.php
===================================================================
--- mediawiki-1.23.13.orig/includes/User.php
+++ mediawiki-1.23.13/includes/User.php
@@ -3806,6 +3806,9 @@ class User {
* @return boolean: Whether the token matches
*/
public function matchEditToken( $val, $salt = '', $request = null ) {
+ if ($val === null) {
+ return false;
+ }
$sessionToken = $this->getEditToken( $salt, $request );
$equals = hash_equals( $sessionToken, $val );
if ( !$equals ) {
|