files: разрешить загрузку html, css и js на форме записи
This commit is contained in:
@@ -1540,7 +1540,7 @@ function fixFilename(str) {
|
||||
}
|
||||
}
|
||||
|
||||
const BLOCKED_EXT = /\.(?:html?|js|mjs|cjs|svg|xml|json|map|wasm|php\d?|phtml|asp|aspx|jsp|sh|bat|cmd|cgi|exe|dll|com|msi|scr|hta|vbs|py|r|rb|htaccess)$/i;
|
||||
const BLOCKED_EXT = /\.(?:svg|xml|json|map|wasm|php\d?|phtml|asp|aspx|jsp|sh|bat|cmd|cgi|exe|dll|com|msi|scr|hta|vbs|py|r|rb|htaccess)$/i;
|
||||
const ALLOWED_IMAGE_EXT = new Set(['.jpg', '.jpeg', '.png', '.gif', '.webp', '.bmp', '.avif', '.ico', '.heic', '.heif', '.jfif']);
|
||||
const UPLOAD_FILE_LIMIT_MB = Math.max(1, parseInt(process.env.UPLOAD_FILE_LIMIT_MB || '50', 10) || 50);
|
||||
const UPLOAD_TOTAL_LIMIT_MB = Math.max(UPLOAD_FILE_LIMIT_MB, parseInt(process.env.UPLOAD_TOTAL_LIMIT_MB || '200', 10) || 200);
|
||||
|
||||
Reference in New Issue
Block a user