added email extension to allowed list type

This commit is contained in:
2026-02-02 16:11:43 -07:00
parent 84803a353e
commit eae4594baf
2 changed files with 3 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ const CORS_ORIGINS = process.env.CORS_ORIGINS
// Allowed file extensions for document uploads (documents only, no executables) // Allowed file extensions for document uploads (documents only, no executables)
const ALLOWED_EXTENSIONS = new Set([ const ALLOWED_EXTENSIONS = new Set([
'.pdf', '.png', '.jpg', '.jpeg', '.gif', '.bmp', '.tiff', '.tif', '.pdf', '.png', '.jpg', '.jpeg', '.gif', '.bmp', '.tiff', '.tif',
'.txt', '.csv', '.log', '.txt', '.csv', '.log', '.msg', '.eml',
'.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx',
'.odt', '.ods', '.odp', '.odt', '.ods', '.odp',
'.rtf', '.html', '.htm', '.xml', '.json', '.yaml', '.yml', '.rtf', '.html', '.htm', '.xml', '.json', '.yaml', '.yml',
@@ -45,6 +45,7 @@ const ALLOWED_MIME_PREFIXES = [
'application/msword', 'application/vnd.openxmlformats', 'application/msword', 'application/vnd.openxmlformats',
'application/vnd.ms-', 'application/vnd.oasis.opendocument', 'application/vnd.ms-', 'application/vnd.oasis.opendocument',
'application/rtf', 'application/json', 'application/xml', 'application/rtf', 'application/json', 'application/xml',
'application/vnd.ms-outlook', 'message/rfc822',
'application/zip', 'application/gzip', 'application/x-7z', 'application/zip', 'application/gzip', 'application/x-7z',
'application/x-tar', 'application/octet-stream' 'application/x-tar', 'application/octet-stream'
]; ];

View File

@@ -221,7 +221,7 @@ export default function App() {
const handleFileUpload = async (cveId, vendor) => { const handleFileUpload = async (cveId, vendor) => {
const fileInput = document.createElement('input'); const fileInput = document.createElement('input');
fileInput.type = 'file'; fileInput.type = 'file';
fileInput.accept = '.pdf,.png,.jpg,.jpeg,.gif,.bmp,.tiff,.tif,.txt,.csv,.log,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.odt,.ods,.odp,.rtf,.html,.htm,.xml,.json,.yaml,.yml,.zip,.gz,.tar,.7z'; fileInput.accept = '.pdf,.png,.jpg,.jpeg,.gif,.bmp,.tiff,.tif,.txt,.csv,.log,.msg,.eml,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.odt,.ods,.odp,.rtf,.html,.htm,.xml,.json,.yaml,.yml,.zip,.gz,.tar,.7z';
fileInput.onchange = async (e) => { fileInput.onchange = async (e) => {
const file = e.target.files[0]; const file = e.target.files[0];