Last modified: 2012-10-17 19:38:48 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 T41844, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39844 - Exceptions caused by mwTimestamp() are not caught
Exceptions caused by mwTimestamp() are not caught
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Markus Krötzsch
https://translatewiki.net/wiki/Specia...
:
Depends on:
Blocks: 39480
  Show dependency treegraph
 
Reported: 2012-08-31 16:53 UTC by Siebrand Mazeland
Modified: 2012-10-17 19:38 UTC (History)
5 users (show)

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


Attachments

Description Siebrand Mazeland 2012-08-31 16:53:41 UTC
Adding (possibly nonsensical) input in URLs for Special:SearchByProperty can cause exceptions. Parameters should be checked and caught in SMW itself, and invalid input should not propagate into core code.

Observed exception:

2012-08-31 16:42:06 v22011026445052.yourvserver.net mediawiki-bw_: [64f709f8] /wiki/Special:SearchByProperty/Modification-20date/29-20April-202011-2000:00:49   Exception from line 109 of /www/translatewiki.net/w/includes/Timestamp.php: MWTimestamp::setTimestamp : Invalid timestamp - 29 April 2011 00:00:49
#0 /www/translatewiki.net/w/includes/Timestamp.php(53): MWTimestamp->setTimestamp('29 April 2011 0...')
#1 /www/translatewiki.net/w/includes/GlobalFunctions.php(2412): MWTimestamp->__construct('29 April 2011 0...')
#2 /www/translatewiki.net/w/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Time.php(149): wfTimestamp(1, '29 April 2011 0...')
#3 /www/translatewiki.net/w/extensions/SemanticMediaWiki/includes/datavalues/SMW_DataValue.php(160): SMWTimeValue->parseUserValue('29 April 2011 0...')
#4 /www/translatewiki.net/w/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php(113): SMWDataValue->setUserValue('29 April 2011 0...', false)
#5 /www/translatewiki.net/w/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php(179): SMWDataValueFactory::newTypeIdValue('_dat', '29 April 2011 0...', false, Object(SMWDIProperty), NULL)
#6 /www/translatewiki.net/w/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialSearchByProperty.php(73): SMWDataValueFactory::newPropertyObjectValue(Object(SMWDIProperty), '29 April 2011 0...')
#7 /www/translatewiki.net/w/includes/SpecialPage.php(611): SMWSearchByProperty->execute('Modification-20...')
#8 /www/translatewiki.net/w/includes/SpecialPageFactory.php(494): SpecialPage->run('Modification-20...')
#9 /www/translatewiki.net/w/includes/Wiki.php(290): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#10 /www/translatewiki.net/w/includes/Wiki.php(536): MediaWiki->performRequest()
#11 /www/translatewiki.net/w/includes/Wiki.php(446): MediaWiki->main()
#12 /www/translatewiki.net/w/index.php(59): MediaWiki->run()
Comment 1 Siebrand Mazeland 2012-09-02 20:07:51 UTC
We're seeing these quite often, all kinds of different parameters. I've put a few in an etherpad[1], maybe it helps in analysing the source.

[1] http://etherpad.wikimedia.org/GD0bnahDcM
Comment 2 Markus Krötzsch 2012-10-17 16:44:27 UTC
Which version of MediaWiki have you been using? The problem seems to have been caused by changes in MediaWiki that had accidentally changed the behaviour of wfTimestamp(). However, the current master of MediaWiki catches this exception, so the problem should be gone now. Do you know of any released MW version that had this problem?
Comment 3 Siebrand Mazeland 2012-10-17 19:38:48 UTC
(In reply to comment #2)
> Which version of MediaWiki have you been using? The problem seems to have been
> caused by changes in MediaWiki that had accidentally changed the behaviour of
> wfTimestamp(). However, the current master of MediaWiki catches this exception,
> so the problem should be gone now. Do you know of any released MW version that
> had this problem?

Seems to have worked itself out indeed. Was observed on master, as almost all issues reported from translatewiki.net.

There has not been a release with the faulty behavior, AFAIK.

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


Navigation
Links