mirror of
https://github.com/profullstack/agentbbs.git
synced 2026-12-01 01:14:47 +00:00
fix(forgejo): disable source archive downloads; crawler archives filled the disk (#187)
Crawlers fetched zip/tar.gz archives of every repo at every commit and Forgejo cached each under data/repo-archive. On 2026-11-30 that hit 11G, filled / and broke every BBS/news write (NNTP 441 "posting failed"). Enforce [repository] DISABLE_DOWNLOAD_SOURCE_ARCHIVES = true on every run; git clone is unaffected. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3f2c8047e0
commit
c6ffccdc87
2 changed files with 9 additions and 2 deletions
|
|
@ -180,8 +180,9 @@ fj_ini_set actions ENABLED false && FJ_INI_CHANGED=1
|
|||
fj_ini_set webhook ALLOWED_HOST_LIST external && FJ_INI_CHANGED=1
|
||||
fj_ini_set migrations ALLOW_LOCALNETWORKS false && FJ_INI_CHANGED=1
|
||||
fj_ini_set security DISABLE_GIT_HOOKS true && FJ_INI_CHANGED=1
|
||||
fj_ini_set repository DISABLE_DOWNLOAD_SOURCE_ARCHIVES true && FJ_INI_CHANGED=1
|
||||
if [ "$FJ_INI_CHANGED" = 1 ]; then
|
||||
log "app.ini hardening applied (actions off, webhooks/migrations external-only, git hooks off)"
|
||||
log "app.ini hardening applied (actions off, webhooks/migrations external-only, git hooks off, source archives off)"
|
||||
fi
|
||||
|
||||
# ---- 3. branding: chovy's mark as logo + favicon -----------------------------
|
||||
|
|
|
|||
8
setup.sh
8
setup.sh
|
|
@ -1429,6 +1429,11 @@ FJ
|
|||
# on loopback next to the Mailu admin API and other local services, so a
|
||||
# member webhook/migration pointed at 127.0.0.1 would be an SSRF.
|
||||
# - Server-side git hooks stay off (they run as the forgejo user).
|
||||
# - Source archive downloads (zip/tar.gz) off. Crawlers requested an
|
||||
# archive of every repo at every commit; Forgejo cached each one under
|
||||
# data/repo-archive, which reached 11G on 2026-11-30, filled the disk and
|
||||
# made every BBS/news write fail (NNTP 441 "posting failed"). git clone
|
||||
# still works.
|
||||
fj_ini_set() { # section key value
|
||||
local section=$1 key=$2 value=$3 tmp
|
||||
tmp=$(mktemp)
|
||||
|
|
@ -1448,8 +1453,9 @@ FJ
|
|||
fj_ini_set webhook ALLOWED_HOST_LIST external && FJ_INI_CHANGED=1
|
||||
fj_ini_set migrations ALLOW_LOCALNETWORKS false && FJ_INI_CHANGED=1
|
||||
fj_ini_set security DISABLE_GIT_HOOKS true && FJ_INI_CHANGED=1
|
||||
fj_ini_set repository DISABLE_DOWNLOAD_SOURCE_ARCHIVES true && FJ_INI_CHANGED=1
|
||||
if [ "$FJ_INI_CHANGED" = 1 ]; then
|
||||
log "forgejo app.ini hardening applied (actions off, webhooks/migrations external-only, git hooks off)"
|
||||
log "forgejo app.ini hardening applied (actions off, webhooks/migrations external-only, git hooks off, source archives off)"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue