fix: add magic-byte checks, login rate limits, and non-root Docker
Close the remaining security gaps: validate upload content against file signatures, rate-limit admin login failures with configurable thresholds, and run the container as uid 1000 instead of root.
This commit is contained in:
1 parent
c11059b851
commit
eda0a3127a
12 files changed
+350
-34
No files matched your search
@@ -19,6 +19,8 @@ SETUP_CONFIG_FIELDS = {
|
||||
"enableChunk",
|
||||
"errorCount",
|
||||
"errorMinute",
|
||||
"loginCount",
|
||||
"loginMinute",
|
||||
"expireStyle",
|
||||
"max_save_seconds",
|
||||
"name",
|
||||
@@ -68,6 +70,8 @@ def _sync_ip_limits() -> None:
|
||||
ip_limit["metadata"].count = settings.errorCount
|
||||
ip_limit["upload"].minutes = settings.uploadMinute
|
||||
ip_limit["upload"].count = settings.uploadCount
|
||||
ip_limit["login"].minutes = settings.loginMinute
|
||||
ip_limit["login"].count = settings.loginCount
|
||||
|
||||
|
||||
async def refresh_settings() -> None:
|
||||
|
||||
Reference in new issue
Block a user