9 Commits
Author SHA1 Message Date
DrSmoothl 87f7bd8c54 fix(websocket): settle failed sends and enforce SDK request deadlines
Settle queued sends once when a connection fails or closes before opening,
and reject further sends while preserving the original failure.

Include connection waits in SDK request deadlines without closing shared
connections or sending expired actions after a late connection.

Refs #665
Refs #666
2026-11-07 12:57:25 +08:00
DrSmoothl 3773106425 fix(onebot): validate payload limits and correct frame diagnostics
Reject invalid payload limits consistently in configuration files, restores, and API writes. Preserve pending frame bytes when reporting oversized messages.

Refs #627
2026-11-01 20:42:20 +08:00
KazusaUwU 8d9f44b6b0 feat(onebot): make the websocket frame cap configurable and diagnosable (#631)
- expose DEFAULT_MAX_PAYLOAD_BYTES; an inbound frame over the cap now reports its
  declared byte size, message type and the effective limit, recovered by walking
  the buffered frame stream so the number is right when a chunk carries several
  frames, the oversized header spans chunks, or control frames are interleaved;
  when the walk cannot reach a verdict the error names the cap without a size
- truncate close reasons to the RFC 6455 control-frame room on a UTF-8 boundary
  (an over-long reason previously produced an invalid control frame)
- add optional maxPayloadBytes (default 100 MiB unchanged) to the three adapters
  that read WebSocket frames: wsServers, wsClients and httpServers with
  enableWebSocket. httpClients rejects the field because it has no WebSocket
  transport, and the value is part of the binding signature so a change rebinds
  the transport instead of being saved without taking effect
- keep the existing 1009 log lines and append the actionable hint instead of
  replacing the template
- WebUI field (including httpServers once the embedded listener is on) and README
  docs for the 100 MiB => ~445 s (7:26) inline PCM consequence
2026-11-01 20:29:16 +08:00
手瓜一十雪 5032cbb8c0 feat(core): add staged self-updates and unify application version 2026-10-18 12:50:11 +08:00
DrSmoothl 7c0519f75f lint 2026-10-12 15:43:34 +08:00
DrSmoothl 52f0f2d24b test(websocket): cover WebSocket client handshake and close paths 2026-08-14 12:10:18 +08:00
DrSmoothl 69a6148f75 test(websocket): cover extensions, native loader, and upgrade errors 2026-08-14 11:09:22 +08:00
DrSmoothl c02c21c46b test(websocket): cover shared WebSocket framing helpers 2026-08-14 10:57:17 +08:00
DrSmoothl ffede67aed fix(websocket): cap decompressed message payloads
Apply the configured payload limit while per-message deflate is producing output, including fragmented frames. Abort oversized expansion before it can allocate unbounded memory.
2026-07-10 13:41:36 +08:00