Files
SnowLuma/packages
时瑾 b3df633c87 fix(bridge): correctness pass on highway, hook, and identity service
* highway/utils detectImageFormat: JPEG SOF marker check now excludes
  0xC4 (DHT), 0xC8 (JPG), and 0xCC (DAC). The old `(marker & 0xFC) ===
  0xC0` matched DHT et al. and then read Huffman table bytes as image
  dimensions, producing junk width/height for many real JPEGs.
* loadBinarySource takes an optional maxBytes; defaults to 1 GiB to
  defend against an authenticated client triggering a multi-GB load
  into memory. Group/private file uploads pass FILE_UPLOAD_MAX_BYTES
  (4 GiB) because QQ's file protocol legitimately supports that size.
  HTTP fetches also pick up a 60s timeout and a Content-Length precheck.
* highway-client.tcpConnect detaches its error/timeout listeners after
  a successful connect so subsequent upload IO errors don't reject an
  already-resolved promise. readHttpResponseBody uses local listener
  refs + a central detach(), eliminating MaxListenersExceededWarning
  during multi-chunk uploads.
* hook/qq-hook-client.nextRequestId now wraps inside uint32 explicitly
  and skips id 0 / in-flight ids. The previous `nextRequestId++ >>> 0`
  loses precision past Number.MAX_SAFE_INTEGER (postfix increment
  evaluates before the shift) and could collide live request ids on
  very long-running processes.
* identity-service.rememberUidUin removes stale partner entries before
  inserting a new (uid, uin) pair. The old code left orphan uidByUin /
  uinByUid entries after a uid/uin re-bind, so the two maps could
  disagree.
2026-05-16 21:31:54 +08:00
..
2026-05-15 23:17:44 +08:00
2026-05-15 23:17:44 +08:00