Prohibit SVG, at the moment is unsafe

This commit is contained in:
Visman 2023-07-10 00:14:14 +07:00
parent fd625f45b5
commit ca04b877f4

View file

@ -21,7 +21,7 @@ use RuntimeException;
class Attachments extends Manager
{
const HTML_CONT = '<!DOCTYPE html><html lang="en"><head><title>.</title></head><body>.</body></html>';
const BAD_EXTS = '%^(?:php.*|phar|[ps]?html?|jsp?|htaccess|htpasswd|f?cgi|)$%i';
const BAD_EXTS = '%^(?:php.*|phar|[ps]?html?|jsp?|htaccess|htpasswd|f?cgi|svg|)$%i';
const FOLDER = '/upload/';
/**