see also bug35005
MediaWiki has already a framework for whitelists for image urls via MediaWiki
system pages.
/** If $wgAllowExternalImages is false, you can allow an on-wiki
- whitelist of regular expression fragments to match the image URL
- against. If the image matches one of the regular expression fragments,
- The image will be displayed. *
- Set this to true to enable the on-wiki whitelist (MediaWiki:External image
whitelist)
- Or false to disable it */
$wgEnableImageWhitelist = true;
Version: unspecified
Severity: normal