Alex Monk has uploaded a new change for review.
https://gerrit.wikimedia.org/r/233398
Change subject: Avoid passing non-strings into User::getCanonicalName
......................................................................
Avoid passing non-strings into User::getCanonicalName
Bug: T109973
Change-Id: I2c6766e3da3128a09535b72f7f78dc32854350e4
---
M includes/CentralAuthHooks.php
1 file changed, 6 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth
refs/changes/98/233398/1
diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index f67f5f9..9859689 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -2129,9 +2129,12 @@
*/
public static function onSpecialLogAddLogSearchRelations( $type,
WebRequest $request, array &$qc ) {
if ( $type === 'gblrename' ) {
- $oldname = User::getCanonicalName( $request->getVal(
'oldname' ) );
- if ( $oldname !== false ) {
- $qc = array( 'ls_field' => 'oldname',
'ls_value' => $oldname );
+ $oldname = $request->getVal( 'oldname' );
+ if ( is_string( $oldname ) ) {
+ $canonicalOldname = User::getCanonicalName(
$oldname );
+ if ( $oldname !== false ) {
+ $qc = array( 'ls_field' => 'oldname',
'ls_value' => $canonicalOldname );
+ }
}
}
--
To view, visit https://gerrit.wikimedia.org/r/233398
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c6766e3da3128a09535b72f7f78dc32854350e4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits