https://bugzilla.wikimedia.org/show_bug.cgi?id=39844

       Web browser: ---
             Bug #: 39844
           Summary: Insufficient URL parameter validation causes exception
           Product: MediaWiki extensions
           Version: master
          Platform: All
               URL: translatewiki.net/wiki/Special:SearchByProperty/Modifi
                    cation-20date/29-20April-202011-2000:00:49
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Semantic MediaWiki
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected],
                    [email protected]
            Blocks: 39480
    Classification: Unclassified
   Mobile Platform: ---


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()

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to