Limit the filename extensions for extracted images and attachments to those listed in allowedExtensions.