Releases
October 2026
reloadOnChangeruns a supervisor (models/BoxExpress.bx): the process you start now stays alive and runs your app as a child process, restarting the child on a.bx/.bxschange. Before, a restart spawned a replacement and exited, so the process a shell, IDE or container started was gone after the first save: Ctrl+C no longer reached the server, a supervisor saw a clean exit (a container, where it was PID 1, stopped outright), and a startup error in the saved code left nothing watching for the fix. Now:- the old child has exited before the new one starts, so the port
handoff no longer depends on BoxLang booting slower than
close(); - a child that crashes is reported (
app exited with code N) and started again on the next save; SIGTERMor Ctrl+C to the supervisor stops the child, and a child whose supervisor is killed outright exits within a second;app.schedule()jobs and the cluster manager started beforelisten()are shut down in the supervisor, so they run only in the child;- a reload child stops immediately on restart by default
(
shutdownTimeoutMsstill overrides it), so an open SSE stream doesn't hold up every save.
- the old child has exited before the new one starts, so the port
handoff no longer depends on BoxLang booting slower than
- Behavior changes: dev mode now runs two JVMs; code before
app.listen()runs in both (code after it, and thelisten()callback, only in the child). The docs also correct the watch root: it is the entry script's directory, not the working directory. - Docs (
docs/auto-restart.md): how the supervisor behaves, and usingwatchexec,nodemonorentrinstead ofreloadOnChange. ProcessLifecycleSpec: the reload test now checks the supervisor survives the restart, plus new cases for crash-then-fix recovery andSIGTERMto the supervisor.
- Sessions (
models/middleware/Session.bx): a changed session is written to the store inres.onBeforeSend(), before the response goes out, not only afternext()returns. With an out-of-process store the old order raced the client's next request: fetch a CSRF token, then POST the login form, and the POST could load the session before the token was written. Feedhouse carried a workaround middleware for this. The after-next()save stays for a chain that sent nothing, a store that failed before send (logged, not thrown, since the response is already marked sent), and a change made after sending, which is now compared case-sensitively. Still one write per request otherwise.
Full notes
- JSON bodies (
models/middleware/BodyParsers.bx): a body that doesn't parse gets a400({ error: true, message: "Malformed JSON body" }) directly, like the413beside it, instead of passing the parse exception tonext(), where it became a500. - Behavior change: error-handling middleware no longer sees malformed
JSON; an app that turned it into its own
400can drop that. - New
SessionPersistSpec, and a malformed-body case inInjectSpec.
September 2026
Behavior changes below before upgrading.
- Routing: skipping routes no longer recurses once per skipped layer. An app with ~550 routes and middleware overflowed the stack on any 404 (500 error); 3,000+ now work, and a 404 past 500 routes went from 258 ms to about 22 ms.
- Static files: dotfiles are ignored by default (
/.envwas served);dotfiles: "deny" | "allow";/.well-known/always served. Added.mjs,.webp,.wasm,.mapand other common types (ES modules were served asapplication/octet-stream).
Full notes
- Streamed file responses:
res.sendFile(),res.download()and static files stream from disk instead of reading the whole file into memory per request (HEADincluded). Range offsets past 2 GB were clamped to the same wrong position; fixed. trust proxytakes a hop count or a list of proxy addresses/CIDRs, as in Express, soreq.ip(and the rate-limit key) can't be picked by a client behind a proxy that appends toX-Forwarded-For.X-Forwarded-Proto/-Hostare believed only from a trusted peer.- Cluster relay:
secretKey(16+ characters) is now required to relay STOMP messages — an unset one used to leave/__clusteropen to anyone who could reach the port. Compared in constant time, case-sensitively. - CSRF: the token is compared in constant time and case-sensitively
(BoxLang's
!=is neither); a JSON array body no longer errors. - WebSockets: same-origin check on
app.ws()handshakes, with{ origins }per route andapp.set("wsOrigins"). - CORS:
credentials: truewithorigin: trueor"*"now throws;Vary: Originis sent whenever the response depends onOrigin. - Sessions:
req.regenerateSession()for login; the in-memory store is capped bymaxSessions(default 100,000) and sweeps expired entries at most every 30 seconds instead of scanning on every 100th write. - Uploads: the stored extension is kept only if alphanumeric and ≤10 characters, with a containment check on the written path. The parser copies part contents straight from the request bytes instead of making several whole-body copies.
- Conditional GET:
If-None-Matchhandles lists,*, and weak tags, and compares case-sensitively. - Removed Handlebars views (
.hbs) and the vendoredhandlebars-4.3.1.jar, which carried an unrelated advisory. Responsebuilds its status and MIME tables once per class instead of per request.- Behavior changes:
.hbsviews throwBoxExpress.UnsupportedViewEngine; convert them to.bxm.- Dotfiles under
boxExpressStatic()are no longer served (usedotfiles: "allow"if you relied on it). app.ws()refuses cross-site browser origins (useoriginsorapp.set("wsOrigins", "*")).- A clustered STOMP broker won't start without a 16+ character
secretKey. boxExpressCors({ credentials: true })without an explicit origin throws.trust proxy: 1(or any number) now means one hop, as in Express, not "trust everything".
- Full suite: 403/403.
- Request IDs:
app.set( "requestId", true )—req.id, anX-Request-Idresponse header (a well-formed one from the client is reused, anything else replaced), and the id in the request and unhandled-error log lines. Off by default.
Full notes
app.metrics(): a Prometheus-format/metricsendpoint — requests by status class and duration, Undertow connections and bytes, open WebSockets, draining state, per-job scheduler runs/failures/skips/last success, cluster peers and manager status, and anysources(a STOMP broker's connections, subscriptions and message counts). Optional bearertoken. A scheduled job that has quietly been failing now shows up as a rising failure counter and a stale last-success time. Full suite: 380/380, also verified in thecli-1.16.0,cli-1.17.0andclicontainer images CI uses.
app.inject(): run a request through an app in-process, with no port, and get backstatusCode,body,headers,json(),header()and the cookies the response set (cookies, ready to pass into the next call to carry a session). Backed by a new in-memory exchange adapter behind the sameRequest/Response/HttpBridgea real request uses. The response-header value check moved into a sharedHeaderGuardso the real server and injected requests reject the same values. Full suite: 361/361.
app.health()andapp.shutdown(): liveness/readiness endpoints for load balancers and Kubernetes, and a graceful stop that flips readiness to draining, refuses new requests, closes open WebSockets and waits up totimeoutMsfor in-flight requests.SIGTERM/Ctrl-C now run it (shutdownTimeoutMs, default 5s;0restores the old immediate stop).wsIdleTimeoutMs: opt-in drop of WebSocket connections that go silent, with server pings so healthy quiet connections survive. The other half of CVE-2026-81624 (unbounded connection lifetime) alongside 0.2.13's message-size cap.
Full notes
- Shared rate limiting:
boxExpressRateLimit( { cache: "name" } )(orstore:) counts in a BoxLang cache so the limit holds across instances.boxExpressSession( { cache: "name" } )is shorthand for the cache-backed session store. - Graceful fallback: the cache-backed stores now degrade to
per-process memory instead of failing requests when the named cache is
missing or a durable store fails at runtime (logged, and recovering on
its own). Behavior change:
boxExpressCacheStore( "missing" )used to throw on first use; it now falls back with a warning — pass{ fallback: false }for the old behavior. - The server now tracks open WebSocket connections so shutdown can close them. Full suite: 340/340.
- STOMP limits: new
maxConnections(default 10000, per node) andmaxSubscribersPerDestination(default 10000) options, the broker-wide counterparts to the per-connection caps added in 0.2.14 — see the Limits table under STOMP. A full broker refuses aCONNECTbefore runningauthenticate(). Full suite: 313/313.
- STOMP: protocol versions 1.0 and 1.1 are now served alongside 1.2
(negotiated at
CONNECT); binary WebSocket frames are accepted inbound; new lifecycle hooksonConnect/onDisconnect/onSubscribe/onUnsubscribe; newstomp.sendToUser(),sendToConnection()(both cluster-aware),disconnect()andgetClusterPresence(); a publish now writes to its subscribers concurrently and drops any whose connection is found closed; heartbeats run on virtual threads instead of one platform thread per connection; and a secondCONNECTon a connected socket is rejected.
Full notes
- Bug fix:
connection.onClose()never fired when the server closed the connection (connection.close(), including STOMP's fatalERRORs and a clientDISCONNECT), so the STOMP registry entries for those connections were never cleaned up. It now fires exactly once per connection however it closes. A write that fails or times out now also closes the connection and fires it, instead of leaving a zombie. - New
connection.onBinary(callback)onapp.ws()connections.libs/boxexpress-ws-shim-1.0.0.jarrebuilt. Full suite: 310/310.
- STOMP fixes:
content-lengthis now an octet count, not a character count (a multi-byte body used to keep the frame's trailing NUL); CRLF-terminated frames now parse (they arrived as commandSEND\rwith an empty body); application headers onSENDare forwarded to subscribers; re-using a subscriptionidon a connection is rejected instead of orphaning the first subscription (which kept receiving for a destination its owner could no longer unsubscribe); and a destination's registry entry is pruned once its last subscriber leaves.
Full notes
- STOMP limits: new
connectTimeoutMs,maxFramesPerSecond(opt-in),maxSubscriptions,maxTransactions,maxTransactionFrames,maxPendingAcksandmaxDestinationLengthoptions, so one client can no longer make the broker buffer or wait without bound — see the Limits table under STOMP. A throwingauthenticate/authorize/onSendcallback now produces anERRORframe instead of silence. Full suite: 285/285.
- Security fix: WebSocket message size is now capped (default 1 MB,
app.set( "wsMaxMessageSize", bytes )). Undertow's own default is unlimited, so anyapp.ws()route (including STOMP and the cluster relay) would buffer an arbitrarily large message from an unauthenticated client (CVE-2026-81624, no upstream fix yet).libs/boxexpress-ws-shim-1.0.0.jarrebuilt. - Security hardening: response header values are now validated — CR/LF, control characters, and characters above Latin-1 are refused, because Undertow narrows each character to 8 bits when writing headers (CVE-2026-19879, no upstream fix yet), which could turn e.g. U+010A into a bare line feed.
Full notes
- Reviewed the vendored jars:
handlebars-4.3.1.jarhas an advisory (GHSA-r4gv-qr8j-p3pg) inFileTemplateLoaderonly, which this project never uses (compileInlineonly), so it was left as is. Full suite: 270/270.
- Bug fix: a burst of WebSocket clients that connect and then vanish
mid-write could freeze the entire server, not just those connections —
root-caused via live reproduction and a thread dump.
app.ws()'s connect callback ran synchronously on Undertow's small, shared I/O thread pool (unlike HTTP requests, which already get their own virtual thread); a blocking send in that callback against a peer that vanished could hang the I/O thread forever, and enough simultaneous zombies pinned the whole pool. Fixed by dispatchingonConnectonto its own virtual thread and boundingconnection.send()'s blocking write with a hard 5s timeout. Also fixed a relatedSchedulerbug the same failure mode exposed: a hung job body left its overlap flag stuck true forever (silently skipping every future tick), and an uncaught exception fromtaskExecutor.submit()itself (not just from a job's callback) could silently cancel every future tick of that job — see Scheduler support for the new watchdog. Verified with three consecutive 20-connection burst-and-abandon attacks against a live server (zero stalls, continuous ticking throughout, vs. a permanent freeze before this fix) plus the full TestBox suite: 268/268.
- Bumped the
testboxdevDependency range to^7.1.0+20and adopted its new assertion features (assertAll(),toBeSameInstanceAs(),toIncludeAll(),withContext()) in the cluster support test specs — grouped failure reporting and labeled context for the timing-sensitive assertions that were hardest to debug while building that feature. No production code changes; full suite: 268/268.
- Security fix: bumped the vendored
libs/undertow-core-*.jarfrom 2.4.2.Final to 2.4.3.Final, fixing five CVEs — three on code paths this project actually exercises:CVE-2026-15565(unauthenticated OOM DoS on any WebSocket endpoint with an@OnMessagehandler),CVE-2026-5680(OOM DoS via WebSocketpermessage-deflateexponential buffer growth), andCVE-2026-15561(missing size/count limits on HTTP/1.1 chunked-transfer decoding, unauthenticated OOM DoS). Also fixed:CVE-2026-14180(a crafted chunk size overlappingChunkReader's own state-flag storage, enabling request smuggling).CVE-2026-15554(a forged-certificate bypass in Undertow's AJP listener) doesn't apply here — this project never uses Undertow's AJP listener, only its core HTTP/WebSocket server. New jar's SHA-1 verified directly against Maven Central's own published checksum before vendoring it.libs/boxexpress-ws-shim-1.0.0.jarrebuilt against the new jar. Full test suite: 268/268.
- Added
app.getClusterManager()— cross-process peer discovery and manager election backed by a durable, sharedcache(), so instances never need to know each other's addresses in advance. Two consumers built on top of it:app.schedule(intervalMs, callback, { clustered: true })(only the elected instance runs the tick, with passive failover on a missed heartbeat) andboxExpressStomp({ cluster: app.getClusterManager() })(relays a publish to every other instance over a mesh of outbound WebSocket connections, delivered through each instance's own subscriber/exchange/listener path — a message that arrived via the relay is never relayed back out). Configured viaboxlang.json'smodules.boxexpress.settings.cluster(module default: off) orapp.set("cluster", {...}).cacheProvideris required once enabled, and is validated at startup against BoxLang's ownIObjectStore.isDistributed()— the in-memory default cache is rejected outright rather than silently leaving every instance unable to see any peer, the same durability requirementboxExpressCacheStore()already has for sessions. Verified first across real separateboxlangOS processes (including a live leader-kill failover and a cross-process STOMP relay), then written up as tests/specs/ClusterManagerSpec.bx, ClusterSchedulerSpec.bx, and ClusterStompRelaySpec.bx. Deliberately not built: per-job leader affinity (one elected instance runs every clustered job, not different jobs on different instances), general peer-to-peer RPC, and binary relay payloads. See ClusterManager.bx and plans/cluster-support.md.
- Added
app.schedule(intervalMs, callback, options)/Scheduler.bx— fixed-interval recurring jobs, thesetIntervalequivalent (deliberately no cron parsing — a real, separable feature this pass doesn't build). One sharedScheduledExecutorServiceper app drives ticks; each tick's callback runs on its own virtual thread, the same request/job-body splitapp.listen()already uses, so a slow job never delays another job's tick. No-overlap is the default (a tick is skipped, not queued, if the previous run hasn't finished — claimed atomically viaAtomicBooleanso the tick thread and the still- running virtual thread can't both think they own the same tick),{ allowOverlap: true }opts out. A thrown error inside a job is caught and logged ([Scheduler] job 'name' threw: ...), never left to kill future ticks — same posture asHttpBridge.bx's dispatch guard andStomp.bx's server-side listener guard.app.getScheduledJobs()is a live introspection getter, same pattern asStomp.bx'sgetConnections()/getSubscriptions().app.close()cancels every job and shuts the scheduler down via the same teardown block that already stops the reload watcher and the HTTP server. In-memory only (no persistence across restarts), no missed-run catch-up, and no clustering — every process instance runs every job independently, the same boundaryStomp.bx's docblock draws for itself around multi-node clustering. See Scheduler.bx and tests/specs/SchedulerSpec.bx (9 specs).
- Filled in the STOMP 1.2 gaps identified in a spec-compliance pass over
Stomp.bx/StompFrameCodec.bx:RECEIPTnow sent for any client frame carrying areceiptheader (previously onlyDISCONNECT); fullACK/NACKsupport (SUBSCRIBE'sackheader, anackheader onMESSAGEunderclient/client-individualmodes, cumulative acking inclientmode);BEGIN/COMMIT/ABORTtransactions, scoped per connection per spec; bidirectional heartbeat negotiation (heart-beat:cx,cyonCONNECT, each direction's interval computed independently per spec section 6, plus server-side monitoring that closes a connection whose negotiated incoming heartbeats stop arriving); andcontent-lengthhonored on both read and write so a body with an embedded NUL byte round-trips correctly instead of being silently truncated at the first one.app.ws()'s WebSocket handshake now also negotiates thev12.stomp/v11.stomp/v10.stompSec-WebSocket-Protocolsubprotocols, for client libraries (stomp.js and others) that send and expect one echoed back — harmless to every otherapp.ws()route, confirmed directly: a client that never sends that header skips negotiation entirely. See Stomp.bx, StompFrameCodec.bx, and tests/specs/StompSpec.bx (20 specs, up from 12). - Followed up with a parity pass against
SocketBox (Ortus's own
WebSocket/STOMP library, read directly from source for this — its
README and
WebSocketSTOMP.cfc) to close the remaining real gaps: exchanges/bindings (direct/topic/fanout/distribution, plus a custom-exchange escape hatch via aclassconfig key), a live connection registry (getConnections()/getConnectionDetails()) withconnectionMetadatathreaded throughauthenticate()/authorize()and echoed back asCONNECTEDheaders, and server-side listeners (options.listeners) that react to a destination from plain server code via a new StompMessage.bx wrapper (auto-JSON-deserializing body,getConnection()null for a server-originated message). Deliberately still not built: multi-node clustering (SocketBox'sClusterManager/ClusterPeer— a distributed- systems feature with no cache-abstraction or multi-node deployment story here to build it against) and binary bodies (a transport limit of WebSocket text frames, not a broker choice). Found and fixed a new, previously-undiscovered BoxLang landmine while building this: a function parameter (or localvar) holding an actualnullcan't be referenced by name at all — not read, reassigned, or passed through to another function, onlyisNull()-checked — unlike avariables.-scope member, which tolerates storing and reading back a realnulldirectly. Worked around with a""sentinel converted to a realnullonly via a directvariables.x = javacast("null","")assignment (seeStompMessage.bx'sinit()); now documented indocs/ARCHITECTURE.md's landmines list alongside a second, smaller one (a bare#inside a BoxLang string literal needs escaping as##, which brokeTopicExchange.bx's own#wildcard match on first write). See tests/specs/StompParitySpec.bx (10 new specs). Full suite: 230/230.
August 2026
- Added
java-src/boxexpress/ws/— this project's first compiled Java, vendored aslibs/boxexpress-ws-shim-1.0.0.jar(rebuild withjava-src/build.sh). Exists because Undertow's own WebSocket receive extension point,io.undertow.websockets.core.AbstractReceiveListener, is an abstract Java class with protected hook methods, not an interface — confirmed directly, not assumed, that BoxLang can't work around that: its documentedextends="java:X"feature for subclassing a Java class fails on the installed runtime (a constructor-argument- forwarding bug reproduced even with BoxLang's own docs example), and implementing the lower-levelorg.xnio.ChannelListenerinterface directly instead hits a wall too — itshandleEventfires fine, but the only way to actually consume a pending frame,channel.receiveFrame(), isprotectedand BoxLang's Java interop can't invoke it.BoxWebSocketListener.javadoes the real Java-side subclassing once and re-exposes every event through a plain interface,WebSocketMessageHandler, that BoxLang code implements viacreateDynamicProxylike everything else in this codebase already does. Every callback runs on its own virtual thread, not Undertow's I/O thread — confirmed necessary, not assumed, after a version without that intermittently reset the connection under a blocking call from inside the receive handler, same class of bug already fixed once for the HTTP request path. See tests/specs/WebSocketShimSpec.bx. - Added
app.ws(path, callback)andWebSocketConnection— WebSocket routes, built on the shim above. A dedicatedWsUpgradeRoutersits in front of Undertow's normal dispatch only when at least oneapp.ws()route is registered (an app that never calls it pays nothing extra); it delegates a matchingUpgrade: websocketrequest to the WebSocket handshake handler and everything else — which is almost every request, even in an app that does useapp.ws()— through the exact same HTTP dispatch chain, completely unchanged. An upgrade request to a path with no registered route falls through to that same chain and gets whatever it would otherwise return (a404if nothing else matches), rather than being silently accepted.WebSocketConnection'ssend()/close()are safe to call from another thread than the one that opened the connection — the same broadcast pattern and the same per-connection lockSseEmitteralready uses, for the same reason.connection.headers/connection.cookiesexpose the handshake request's headers/cookies (mirroringreq.headers/req.cookies), sinceapp.ws()routes bypass theuse()middleware chain entirely — a session cookie is otherwise unreachable from a WebSocket handler. See WebSocketConnection.bx and tests/specs/WebSocketRouteSpec.bx. - Added
boxExpressStomp()/Stomp— a STOMP 1.2 pub/sub broker built entirely on top ofapp.ws(), no changes needed to the shim or the WebSocket routing layer above.StompFrameCodec.bxescapes header values (backslash/newline/colon) per spec rather than just stripping them — the protocol-correct version of the same injection fixSseEmitter.bxneeded, applied here before it could ever become a bug instead of after. Deliberately smaller than some STOMP brokers' full feature set for a first version — no exchanges/bindings, transactions, clientACK/NACK, binary bodies, or full bidirectional heartbeat negotiation; see the STOMP docs for what's actually built and why the rest was deliberately deferred. Two real BoxLang bugs found and fixed while building this, both now documented in docs/ARCHITECTURE.md: aprivatemethod isn't reachable from a closure once that closure is invoked from outside the class that defined it (every helperStomp.bx's handler closures call had to become a plain method because of this), andduplicate()can't deep-copy a struct holding a raw Java object reference —structCopy()(shallow) is what_deliver()actually needs. Security fix (found in review before this shipped): the shared subscriber registry was keyed on the client-suppliedSUBSCRIBEidheader alone, with no per-connection scoping — since STOMP subscription ids aren't secret (many client libraries assign them sequentially, e.g.sub-0), a second connection subscribing to the same destination with the same id silently overwrote the first connection's entry, redirecting the first connection's messages to the second with no error to either side, and let the second connection'sUNSUBSCRIBEdelete the first connection's subscription. Fixed by keying the registry on a server-generated per-connection id combined with the client's own subscription id, so no cross-connection collision is possible even when two clients choose identical ids. See Stomp.bx and tests/specs/StompSpec.bx. - Security fix:
SseEmitter.send()'sevent/idarguments andcomment()'stextargument were concatenated directly into their SSE field lines with no newline stripping — unlikedata, which is safely split per-line. An embeddedchar(10)in either let a caller that pipes request-derived input intoevent/id(a channel name, a correlation ID) have a client inject a fabricateddata:/event:/id:line, or a blank line starting an entirely new, attacker-defined event, into the stream every other client reading it sees — a cross-client message- spoofing primitive, the same class of issue as CRLF injection in a response header value. Found in a security review, not by a report.event/id/comment()'stextare now stripped ofchar(13)/char(10)before being written. See SseEmitter.bx.
- Fix:
res.render()on BoxLang 1.17.0 was still broken after 0.1.8's fix —app.set("views", dir)registered the required mapping, butRequestBoxContext.getConfig()memoizes its merged config struct on first read and never invalidates it. The context that runsapp.bxs(captured bylisten()when it buildsHttpBridge, then reused for every request afterward) may have already read+cached its config via an earlierapp.use()/route call before the mapping was registered — so the mapping was live on the runtime'sConfigurationbut invisible to every request'sinclude, andrender()kept failing exactly as before.app.set("views", dir)now also callsgetBoxContext().clearConfigCache()right after registering the mapping, forcing that context to pick it up. Verified end-to-end against a real running server on BoxLang 1.17.0+58 — every route serving a view now returns 200 instead of 500.
- Added
res.sse(callback)— Server-Sent Events, a long-lived one-way event stream to the client. Not a wrapper around BoxLang's ownSSE()BIF — confirmed directly that it isn't callable from a BoxExpress route handler at all (Function [SSE] not found), since it lives in theboxlang-web-supportruntime module that BoxExpress doesn't load (BoxExpress implements its own HTTP layer directly against Undertow instead).res.sse()'semitter.send()/comment()/close()/isClosed()API deliberately mirrors that BIF's shape anyway, since it's a proven design — just built from scratch against Undertow's raw exchange. Bypasses the normal buffered_end()path entirely (every other terminal method builds one byte array and sends it once; this writes incrementally asemitter.send()is called), and detects a client disconnect from a failed write rather than polling connection state.send()/comment()/close()are safe to call from more than one thread — a route handler broadcasting to an emitter stashed elsewhere, concurrently with the connection's ownres.sse()callback — each funnels through the same per-emitter lock so two writers can't interleave and corrupt the SSE framing on the sharedOutputStream; confirmed under real concurrent load (5 threads, 125 writes, zero malformed/duplicated frames). See SseEmitter.bx and the Server-Sent Events docs.