(bug 43177) API: Fix regression in case handling for sha1 params
authorBrad Jorsch <bjorsch@wikimedia.org>
Sun, 16 Dec 2012 22:45:31 +0000 (17:45 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 17 Dec 2012 14:30:12 +0000 (09:30 -0500)
commitf2383b216efad6a9e19492c6cae41911163528f0
tree7d89ecad4696a0652144983057312f7c63e75ba9
parent3f902fc6f56c525bdcaae891e2506ed60018ee3e
(bug 43177) API: Fix regression in case handling for sha1 params

While the change in Ic980fd71 makes sense since MediaWiki stores the
hashes with lowercase letters, historically aisha1 and fasha1 accepted
both upper and lowercase because wfBaseConvert accepts both.

To avoid a backwards compatibility break, let's adjust the code to
explicitly lowercase the input for those parameters. And for good
measure, let's also accept both cases for the corresponding sha1base36
parameters.

Change-Id: I704935193398c722c22a302dc9d23f2c0e2e3e39
includes/api/ApiQueryAllImages.php
includes/api/ApiQueryFilearchive.php