Issue 301 redirects for Special:Search/searchterm
authorErik Bernhardson <ebernhardson@wikimedia.org>
Wed, 17 Aug 2016 18:35:54 +0000 (11:35 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Thu, 18 Aug 2016 22:31:45 +0000 (15:31 -0700)
commitc2e8264b5349d3efed998b4f53abe0c289ec3b18
treef70de918606ee30454c9f4df7fba9b526ca78379
parent940c1e1089943649a8dad11cd6ef7aab65b02731
Issue 301 redirects for Special:Search/searchterm

Including the search term, which is PII, in the page title allows for
leaking this information through page view dumps. Instead of happily
handling these issue a 301 redirect to tell clients they should not
be issueing these requests, and should instead use the search query
parameter. Dumps at wikimedia remove 30[123] response codes from the
dump output so this will also stop leaking the PII.

Change-Id: Icce7cc4585e90742a8dd3513e7c9f7276e479cd7
includes/specials/SpecialSearch.php
tests/phpunit/specials/SpecialSearchTest.php [new file with mode: 0644]