Commit Graph
9 Commits
Author SHA1 Message Date
SirHumza efa635d989 JSON input cap + oversize test 2026-09-24 10:28:01 +02:00
SirHumza db38c05077 WIP: integer-ms timestamps (fixes 0:00), jl_new_int port 2026-09-23 19:10:59 +02:00
SirHumza c8fea26699 v04-plus: port TLS 1.2 ceiling + debug trace, since:null, titleId details, jl_new_null 2026-09-22 17:52:24 +02:00
SirHumza 0dedb15ef8 jsonlite: depth cap + bounded number scan + hostile tests 2026-09-19 10:27:04 +02:00
SirHumza bf5579d6da Stable gateway backend: mbedTLS, 8MB READY, JSON-safe parsing
- BearSSL replaced with mbedTLS (TLSv1.3 passes Cloudflare)
- 8MB frame cap + truncation-proof gateway op/seq scanner
- Thread-safe compat, locked logging, atomic config with template
- Daemon keeps last-good config, persistent presence timer
- 256B token buffers, weak-libc shims, portable build preflights
- Tests: gateway spoof + OOM cases pass

Still open: display names fall back to titleId in sandbox,
cover art needs shared Discord app assets. Backend fully functional.
2026-09-19 01:03:17 +02:00
SirHumza 6dbfa1512c Harden networking, lifecycle, and build validation
Add BearSSL integration, strict utility handling, WebSocket validation,
plugin lifecycle cleanup, host regression tests, and reproducible GoldHEN
build support.
2026-08-27 20:38:39 +02:00
SirHumza d40fc600c4 revise: fix TLS handshake, heartbeat ack, RESUME, seq parse, party
ws: SSL_connect on the non-blocking socket now polls WANT_READ/WANT_WRITE
  with a deadline (previously it would fail the very first handshake);
  handshake response read in chunks so the 5s deadline can't spuriously
  trip; ws_send_text errors on oversized frames instead of silently
  truncating; added ws_send_pong for RFC6455 server pings.
discord: heartbeat ack tracking -> reconnect on 2x-interval silence;
  handle op 7 (reconnect) and op 9 (invalid session, clears session_id);
  parse the sequence from the correct "s" field (was "seq", never
  matched, heartbeat always sent d:0); READY captures session_id for
  RESUME; reconnect now RESUMEs (op 6) when a session exists and falls
  back to IDENTIFY on invalid-session; party size now emitted in the
  activity; dropped the unused 'intent' arg; zeroed gateway-fetch buffer.
main: use config presence_state (was hardcoded); reset last_name after
  reconnect so the current game is re-pushed immediately.
cfg: clamp poll_interval_s to [5,300]; atomic config save (tmp+rename).
log: seconds in timestamps; rotate log at 512 KB.
jsonlite: jl_obj_get/jl_arr_at return non-const (fixes const-drop
  warnings); stringify emits proper "null" for missing pair values.
detect: trim whitespace around app.xml title; drop per-poll log spam.
2026-08-14 20:24:24 +02:00
SirHumza 90c86d9f1a fix: leaks, OOB read, handshake timeout, identify shape, b64 terminator
- jsonlite: jl_free leaked every object inside an array (sibling pairs,
  keys, values). Verified 39/39 allocs freed (was 15 leaked/presence).
- discord: IDENTIFY now sends required connection properties
  os/browser/device; dropped bot-only intents field for user connection.
- ws: recv_frame returns bytes actually copied (was full payload length ->
  jl_parse OOB read on >1023B frames); handshake SSL_read handles
  WANT_READ with 5s deadline (was infinite busy-wait); per-frame random
  client mask (RFC 6455 5.3) instead of static 0x12345678.
- main: daemon retries token/gateway failures instead of exiting
  (GoldHEN payload runs once per boot).
- b64: NUL-terminate output (callers relied on pre-zeroed buffers).
2026-08-14 19:58:57 +02:00
SirHumza af1a48dbf3 chore: rename project PS4RP -> orbisRPC
- Repo renamed to SirHumza/orbisRPC on GitHub
- Source dir PS4RP/ -> orbisrpc/
- Binaries ps4rp.{elf,fself,bin} -> orbisrpc.{elf,fself,bin}
- On-console config dir /data/PS4RP -> /data/orbisRPC
- Build outputs, HTTP UA, net pool/socket names, README, SETUP
  guide all updated to orbisRPC
2026-08-14 10:31:14 +02:00