Page MenuHomePhabricator

Address Voice and Tone issues in FileImporter
Closed, ResolvedPublic2 Estimated Story Points

Description

Targets
    Occurrences of '(white|black)[ \-]?list' in Directory /Users/reedy/PhpstormProjects/mediawiki/extensions/FileImporter
Found Occurrences  (19 usages found)
    extensions  (19 usages found)
        FileImporter  (19 usages found)
            docs  (1 usage found)
                wikitext-cleanup.md  (1 usage found)
                    66 [on-wiki black- and whitelists](https://en.wikipedia.org/wiki/Special:PrefixIndex/Wikipedia:MTC!/)
            src  (12 usages found)
                Remote  (12 usages found)
                    MediaWiki  (12 usages found)
                        WhitelistDomainFileUrlChecker.php  (12 usages found)
                            11 class WhitelistDomainFileUrlChecker extends AnyMediaWikiFileUrlChecker {
                            16 private $whiteListDomains;
                            19 * @param string[] $whitelistDomains
                            21 public function __construct( array $whitelistDomains ) {
                            22 $this->whiteListDomains = $whitelistDomains;
                            31 foreach ( $this->whiteListDomains as $whiteListDomain ) {
                            32 $whiteListDomainLength = strlen( $whiteListDomain );
                            33 $whiteListFirstChar = $whiteListDomain[0];
                            35 if ( $whiteListFirstChar === '.' ) {
                            36 // If the whitelist domain starts with a . allow subdomains
                            37 if ( substr( $host, -$whiteListDomainLength ) === $whiteListDomain ) {
                            42 if ( $host === $whiteListDomain ) {
            tests  (6 usages found)
                phpunit  (6 usages found)
                    MediaWiki  (6 usages found)
                        FileImporterUploadBaseTest.php  (1 usage found)
                            20 $this->setMwGlobals( 'wgFileBlacklist', [ 'jpg' ] );
                        WhitelistDomainFileUrlCheckerTest.php  (5 usages found)
                            6 use FileImporter\Remote\MediaWiki\WhitelistDomainFileUrlChecker;
                            9 * @covers \FileImporter\Remote\MediaWiki\WhitelistDomainFileUrlChecker
                            14 class WhitelistDomainFileUrlCheckerTest extends \PHPUnit\Framework\TestCase {
                            35 public function testCheck( $whiteList, $url, $expected ) {
                            37 $checker = new WhitelistDomainFileUrlChecker( $whiteList );

Related Objects

Event Timeline

Change 750713 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/FileImporter@master] Rename \"whitelist\" to \"allowed domains\" everywhere

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

Change 750713 merged by jenkins-bot:

[mediawiki/extensions/FileImporter@master] Rename \"whitelist\" to \"allowed domains\" everywhere

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