Skip to content

fix: validate signaling JSON and ICE indexes strictly - #437

Merged
devopvoid merged 1 commit into
mainfrom
fix/strict-signal-validation
Oct 24, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix/strict-signal-validation

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

The signaling JSON parser now follows RFC 8259 exactly: no raw control characters in strings, strict number syntax, finite numbers only, four-digit hex escapes, JSON whitespace only, no duplicate member names.

sdpMLineIndex must be an integer from 0 to 65535; 1.9 and 1e999 were silently turned into 1 and 2147483647 by intValue(). SignalMessage.of(RTCIceCandidate) checks the same range, so toJson() never writes what fromJson() rejects.

The parser now follows RFC 8259 exactly: no raw control characters in strings, strict number syntax, finite numbers only, four-digit hex escapes, JSON whitespace only, no duplicate member names. sdpMLineIndex must be an integer from 0 to 65535 instead of being truncated by intValue().
@devopvoid
devopvoid merged commit ce430f4 into main Oct 24, 2026
25 checks passed
@devopvoid
devopvoid deleted the fix/strict-signal-validation branch October 24, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant