Topic on Extension talk:AbuseFilter

Trying to create an abuse filter that blocks certain images from being posted.

8
98.158.206.112 (talkcontribs)

Hi! I am an admin on a fairly big wiki software site. I have been encountering spams with hitler images and porn gifs. Would anyone know a way to block these images?

I don't have a bad media list. Or does anyone know how to create a bad media list?


Thank you!

Ciencia Al Poder (talkcontribs)

Are images already uploaded? Or are you using Wikimedia Commons images?

You can add specific image names to MediaWiki:Bad image list (on your wiki) to prevent them from being displayed on pages other than the allowed there.

If the images are being uploaded on your wiki, there's nothing much to do than to adjust upload permissions to autoconfirmed, or restrict uploads at all to trusted users or admins

98.158.206.112 (talkcontribs)

Hi Ciencia,

I would like to prevent the upload of all gifs in general.

Matěj Suchánek (talkcontribs)

You can try to ban .gif extensions, like action == 'upload' & page_title irlike '\.gif$'. But this can be bypassed easily.

Perhaps you want to raise permission for uploading files and grant them explicitly.

Ciencia Al Poder (talkcontribs)

To disallow upload of gifs, redefine $wgFileExtensions in LocalSettings.php without including gif. However, that can be bypassed by uploading static images. As Matěj Suchánek, you should limit who can upload files with permissions.

STITCH+COFFEE (talkcontribs)

Hi @Matěj Suchánek , thank you for the information. Is that the full code?And does it work on the abuse filter configuration page? I have just been copying/pasting abuse filters from public sources to block my current spam.

@Ciencia Al Poder , I apologize in advance for my lack of knowledge, how do I access the LocalSettings.php on my Wiki Software page?


As for static images, the business owner does not want to implement the limit.

Matěj Suchánek (talkcontribs)

I have never created filters for uploads, so I might be missing something but if you want to prevent uploading gifs (where gifs are identified with .gif extension), this should work.

There is a good and maintained documentation for filters you may want to read: Extension:AbuseFilter/Rules format.

Ciencia Al Poder (talkcontribs)

LocalSettings.php is a file in the server. You'll need server access by FTP or ssh (or remote desktop on windows) to modify it.

Reply to "Trying to create an abuse filter that blocks certain images from being posted."