registration: Perform extra validation for mediawiki.org URLs
authorKunal Mehta <legoktm@member.fsf.org>
Sat, 19 May 2018 20:05:08 +0000 (13:05 -0700)
committerKunal Mehta <legoktm@member.fsf.org>
Sat, 19 May 2018 23:26:15 +0000 (16:26 -0700)
commit399b391f240e94d4025dcd740b5df584c640b6a9
tree867e7ad8ce6ef7b8fe78dfe8c35bc2fb12748302
parent399d9c24a85b7e108ccfc51140af225c458f00b9
registration: Perform extra validation for mediawiki.org URLs

If the "url" field in extension.json is pointing to mediawiki.org,
perform some extra validation steps:
* Require HTTPS
* Require the `www.mediawiki.org` canonical domain

Change-Id: I3371443d3f6c76f53437adf90a700969bba7d0e7
includes/registration/ExtensionJsonValidator.php
tests/phpunit/data/registration/bad_url.json [new file with mode: 0644]
tests/phpunit/data/registration/bad_url2.json [new file with mode: 0644]
tests/phpunit/includes/registration/ExtensionJsonValidatorTest.php