Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/107018
Change subject: Validate $this->mAddress before storing it ...................................................................... Validate $this->mAddress before storing it Bug: 58934 Change-Id: I85057ad1543ede272e9abd3b5bd034fc27a6b47a --- M SpecialGlobalBlock.php 1 file changed, 2 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalBlocking refs/changes/18/107018/1 diff --git a/SpecialGlobalBlock.php b/SpecialGlobalBlock.php index 81c2844..6482b2e 100644 --- a/SpecialGlobalBlock.php +++ b/SpecialGlobalBlock.php @@ -98,10 +98,8 @@ function loadParameters( $par ) { $request = $this->getRequest(); - $this->mAddress = trim( $request->getText( 'wpAddress' ) ); - if ( !$this->mAddress ) { - $this->mAddress = $par; - } + $address = trim( $request->getText( 'wpAddress', $par ) ); + $this->mAddress = IP::isIPAddress( $address ) ? $address : ''; $this->mReason = $request->getText( 'wpReason' ); $this->mReasonList = $request->getText( 'wpBlockReasonList' ); @@ -273,9 +271,6 @@ if ( $this->mAddress ) { $title = Title::makeTitleSafe( NS_USER, $this->mAddress ); - if ( !$title ) { - return; - } LogEventsList::showLogExtract( $out, 'gblblock', -- To view, visit https://gerrit.wikimedia.org/r/107018 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85057ad1543ede272e9abd3b5bd034fc27a6b47a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GlobalBlocking Gerrit-Branch: master Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits