• exec/webfileindex.ssjs

    From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Monday, June 01, 2026 22:25:27
    https://gitlab.synchro.net/main/sbbs/-/commit/d777bda5c58ee28593e539b2
    Modified Files:
    exec/webfileindex.ssjs
    Log Message:
    webfileindex: deflect crawlers from ?view= to prevent OOM crash

    The per-file ?view= path renders archive listings/images and explodes the crawlable URL space, while the index materializes the entire file_area on
    each request -- a large allocation in the 32-bit mozjs185 JS heap.
    Aggressive bots ignore robots.txt (webv4 already sends Disallow: /) and walk thousands of these, exhausting the heap; mozjs185 then turns the allocation failure into an access violation (0xc0000005 in mozjs185-1.0.dll) that
    crashes the whole in-process server (sbbsctrl) instead of a catchable JS OOM exception. Crashed sbbsctrl.exe on vert twice (5/29 + 6/1), each correlated with a "webfileindex.ssjs line 299: out of memory" web-log entry from a
    crawler hitting /files/...?view=...

    Deflect known crawler User-Agents with a cheap 429 *only* on ?view=
    requests, before any file_area access. Bots can still index directory
    listings; real browsers are unaffected. Stopgap until the SM128/64-bit migration, where OOM is catchable.

    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net