Skip to content

Commit fa0d182

Browse files
committed
feat: Expand allowed file extensions in security configuration
- Added a comprehensive list of allowed file extensions for various categories including text, Microsoft Office, OpenDocument formats, data formats, images, web files, scripts, and archives to enhance file handling capabilities.
1 parent 8193e1b commit fa0d182

1 file changed

Lines changed: 54 additions & 7 deletions

File tree

src/config/security.py

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,48 @@ class SecurityConfig(BaseSettings):
1717
# File Security
1818
allowed_file_extensions: List[str] = Field(
1919
default_factory=lambda: [
20+
# Text and documentation
2021
".txt",
22+
".md",
23+
".rtf",
24+
".pdf",
25+
# Microsoft Office
26+
".doc",
27+
".docx",
28+
".dotx",
29+
".xls",
30+
".xlsx",
31+
".xltx",
32+
".ppt",
33+
".pptx",
34+
".potx",
35+
".ppsx",
36+
# OpenDocument formats
37+
".odt",
38+
".ods",
39+
".odp",
40+
".odg",
41+
# Data formats
42+
".json",
43+
".csv",
44+
".xml",
45+
".yaml",
46+
".yml",
47+
".sql",
48+
# Images
49+
".png",
50+
".jpg",
51+
".jpeg",
52+
".gif",
53+
".svg",
54+
".bmp",
55+
".webp",
56+
".ico",
57+
# Web
58+
".html",
59+
".htm",
60+
".css",
61+
# Code files
2162
".py",
2263
".js",
2364
".ts",
@@ -32,18 +73,24 @@ class SecurityConfig(BaseSettings):
3273
".r",
3374
".f90",
3475
".d",
35-
".json",
36-
".csv",
37-
".xml",
38-
".yaml",
39-
".yml",
40-
".md",
41-
".sql",
76+
# Scripts and config
4277
".sh",
4378
".bat",
4479
".ps1",
4580
".dockerfile",
4681
".makefile",
82+
".ini",
83+
".cfg",
84+
".conf",
85+
".log",
86+
# Archives
87+
".zip",
88+
# Email and calendar
89+
".eml",
90+
".msg",
91+
".mbox",
92+
".ics",
93+
".vcf",
4794
]
4895
)
4996
blocked_file_patterns: List[str] = Field(

0 commit comments

Comments
 (0)