Page MenuHomePhabricator

PHP Deprecated: Invalid characters passed for attempted conversion, these have been ignored (SpecialShortUrl)
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error
normalized_message
[{reqId}] {exception_url}   PHP Deprecated: Invalid characters passed for attempted conversion, these have been ignored
exception.trace
from /srv/mediawiki/php-1.40.0-wmf.2/extensions/ShortUrl/includes/Utils.php(97)
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 /srv/mediawiki/php-1.40.0-wmf.2/extensions/ShortUrl/includes/Utils.php(97): base_convert(string, integer, integer)
#2 /srv/mediawiki/php-1.40.0-wmf.2/extensions/ShortUrl/includes/Specials/SpecialShortUrl.php(39): MediaWiki\Extension\ShortUrl\Utils::decodeURL(string)
#3 /srv/mediawiki/php-1.40.0-wmf.2/includes/specialpage/SpecialPage.php(701): MediaWiki\Extension\ShortUrl\Specials\SpecialShortUrl->execute(string)
#4 /srv/mediawiki/php-1.40.0-wmf.2/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run(string)
#5 /srv/mediawiki/php-1.40.0-wmf.2/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#6 /srv/mediawiki/php-1.40.0-wmf.2/includes/MediaWiki.php(904): MediaWiki->performRequest()
#7 /srv/mediawiki/php-1.40.0-wmf.2/includes/MediaWiki.php(562): MediaWiki->main()
#8 /srv/mediawiki/php-1.40.0-wmf.2/index.php(50): MediaWiki->run()
#9 /srv/mediawiki/php-1.40.0-wmf.2/index.php(46): wfIndexMain()
#10 /srv/mediawiki/w/index.php(3): require(string)
#11 {main}
Notes

Similar to T288922 which notes there's a PHP7.4 change in https://www.php.net/manual/en/function.hexdec.php

Details

Request URL
https://bn.wikipedia.org/wiki/%E0%A6%AC%E0%A6%BF%E0%A6%B6%E0%A7%87%E0%A6%B7:ShortUrl/*

Related Objects

Event Timeline

Change 838274 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/ShortUrl@master] Ignore non-valid short url hashes

https://gerrit.wikimedia.org/r/838274

Umherirrender renamed this task from PHP Deprecated: Invalid characters passed for attempted conversion, these have been ignored to PHP Deprecated: Invalid characters passed for attempted conversion, these have been ignored (SpecialShortUrl).Oct 4 2022, 9:35 PM
Umherirrender claimed this task.

It is possible to get more from an example request url? The hash should not be a private information, but I am interested if the hash ends with a punctation mark like a dot, comma or parentheses.

This could be happen when a email client is trying to link a raw url and also linking the punctation after it. The other explaination for invalid character is a fuzzing test on that special page, which should not be a breaking change when characters are now ignored.

Change 838274 merged by jenkins-bot:

[mediawiki/extensions/ShortUrl@master] Ignore non-valid short url hashes

https://gerrit.wikimedia.org/r/838274