Last modified: 2014-04-25 06:39:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60934, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58934 - Fatal error: Call to a member function getPrefixedText() on a non-object at SpecialGlobalBlock.php on line 278
Fatal error: Call to a member function getPrefixedText() on a non-object at S...
Status: PATCH_TO_REVIEW
Product: MediaWiki extensions
Classification: Unclassified
GlobalBlocking (Other open bugs)
master
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-24 13:25 UTC by Sam Reed (reedy)
Modified: 2014-04-25 06:39 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sam Reed (reedy) 2013-12-24 13:25:07 UTC
[13:19:51] <matanya> this one was ipv6 address
[13:20:20] <matanya> Reedy: 2A02:2498:E003:68:225:90FF:FE88:4840 if to be specific

[24-Dec-2013 12:55:46] Fatal error: Call to a member function getPrefixedText() on a non-object at /usr/local/apache/common-local/php-1.23wmf7/extensions/GlobalBlocking/SpecialGlobalBlock.php on line 278
Server: mw1057
Method: POST
URL: http://meta.wikimedia.org/wiki/Special:GlobalBlock
Backtrace:
#0 /usr/local/apache/common-local/php-1.23wmf7/extensions/GlobalBlocking/SpecialGlobalBlock.php(278): SpecialGlobalBlock::form()
#1 /usr/local/apache/common-local/php-1.23wmf7/extensions/GlobalBlocking/SpecialGlobalBlock.php(69): SpecialGlobalBlock->form('<div class="err...')
#2 /usr/local/apache/common-local/php-1.23wmf7/includes/specialpage/SpecialPage.php(673): SpecialGlobalBlock->execute(NULL)
#3 /usr/local/apache/common-local/php-1.23wmf7/includes/SpecialPageFactory.php(488): SpecialPage->run(NULL)
#4 /usr/local/apache/common-local/php-1.23wmf7/includes/Wiki.php(298): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#5 /usr/local/apache/common-local/php-1.23wmf7/includes/Wiki.php(596): MediaWiki->performRequest()
#6 /usr/local/apache/common-local/php-1.23wmf7/includes/Wiki.php(460): MediaWiki->main()
#7 /usr/local/apache/common-local/php-1.23wmf7/index.php(49): MediaWiki->run()
#8 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#9 {main}
Comment 1 Gerrit Notification Bot 2013-12-24 13:26:58 UTC
Change 103542 had a related patch set uploaded by Reedy:
Title::makeTitleSafe can return null

https://gerrit.wikimedia.org/r/103542
Comment 2 Gerrit Notification Bot 2013-12-24 13:27:17 UTC
Change 103542 merged by jenkins-bot:
Title::makeTitleSafe can return null

https://gerrit.wikimedia.org/r/103542
Comment 3 Sam Reed (reedy) 2013-12-24 13:34:59 UTC
reedy@tin:~$ mwscript eval.php metawiki
> $title = Title::makeTitleSafe( NS_USER, 2A02:2498:E003:68:225:90FF:FE88:4840' );

> var_dump( $title );
object(Title)#64 (28) {
  ["mTextform"]=>
  string(36) "2A02:2498:E003:68:225:90FF:FE88:4840"
  ["mUrlform"]=>
  string(36) "2A02:2498:E003:68:225:90FF:FE88:4840"
  ["mDbkeyform"]=>
  string(36) "2A02:2498:E003:68:225:90FF:FE88:4840"
  ["mUserCaseDBKey"]=>
  string(36) "2A02:2498:E003:68:225:90FF:FE88:4840"
  ["mNamespace"]=>
  int(2)
  ["mInterwiki"]=>
  string(0) ""
  ["mFragment"]=>
  string(0) ""
  ["mArticleID"]=>
  int(-1)
  ["mLatestID"]=>
  bool(false)
  ["mContentModel"]=>
  bool(false)
  ["mEstimateRevisions":"Title":private]=>
  NULL
  ["mRestrictions"]=>
  array(0) {
  }
  ["mOldRestrictions"]=>
  bool(false)
  ["mCascadeRestriction"]=>
  NULL
  ["mCascadingRestrictions"]=>
  NULL
  ["mRestrictionsExpiry"]=>
  array(0) {
  }
  ["mHasCascadingRestrictions"]=>
  NULL
  ["mCascadeSources"]=>
  NULL
  ["mRestrictionsLoaded"]=>
  bool(false)
  ["mPrefixedText"]=>
  NULL
  ["mTitleProtection"]=>
  NULL
  ["mDefaultNamespace"]=>
  int(0)
  ["mWatched"]=>
  NULL
  ["mLength"]=>
  int(-1)
  ["mRedirect"]=>
  NULL
  ["mNotificationTimestamp"]=>
  array(0) {
  }
  ["mHasSubpage"]=>
  NULL
  ["mPageLanguage":"Title":private]=>
  bool(false)
}
Comment 4 Sam Reed (reedy) 2013-12-24 13:40:06 UTC
[13:34:55] <matanya>     The IP address (2A02:2498:E003:68:225:90FF:FE88:4840) you entered is invalid. Please note that you cannot enter a user name!


'globalblocking-block-ipinvalid' => 'The IP address ($1) you entered is invalid.
Please note that you cannot enter a user name!',

		$ip = IP::sanitizeIP( $address );

...

		if ( !IP::isIPAddress( $ip ) ) {
			// Invalid IP address.
			$errors[] = array( 'globalblocking-block-ipinvalid', $ip );
		}




reedy@tin:/a/common$ mwscript eval.php metawiki
> $ip = '2A02:2498:E003:68:225:90FF:FE88:4840';

> $ip = IP::sanitizeIP( $ip );

> var_dump( $ip, IP::isIPAddress( $ip ) );
string(36) "2A02:2498:E003:68:225:90FF:FE88:4840"
bool(true)
Comment 5 Andre Klapper 2014-01-02 11:29:05 UTC
Reedy: Is this fixed by your patch, or is more work needed?
Comment 6 Gerrit Notification Bot 2014-01-07 03:35:07 UTC
Change 105889 had a related patch set uploaded by Tim Starling:
Title::makeTitleSafe can return null

https://gerrit.wikimedia.org/r/105889
Comment 7 Gerrit Notification Bot 2014-01-07 03:35:42 UTC
Change 105889 merged by jenkins-bot:
Title::makeTitleSafe can return null

https://gerrit.wikimedia.org/r/105889
Comment 8 db [inactive,noenotif] 2014-01-11 20:15:13 UTC
Only the fatal is fixed, Tim wrote that it "might warrant further investigation later", so remarking as NEW
Comment 9 Gerrit Notification Bot 2014-01-12 07:35:26 UTC
Change 107018 had a related patch set uploaded by Legoktm:
Validate $this->mAddress before storing it

https://gerrit.wikimedia.org/r/107018
Comment 10 Kunal Mehta (Legoktm) 2014-01-12 07:37:50 UTC
I reproduced it locally by entering an invalid username ("<><") and then submitting the form.

I'm not sure why the IP address in comment 0 is failing, maybe the post data got corrupted while being sent to the server? Either way, this should fix the fatal.
Comment 11 Andre Klapper 2014-04-25 06:39:13 UTC
Patch has a -1 and needs rework

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links