mirror of
https://github.com/livekit/livekit.git
synced 2026-11-05 00:18:25 +00:00
* service: enforce participant name length on join StartSession checked the token's metadata and attributes against the configured limits but not its name, so a participant could join with a name longer than limits.max_participant_name_length, which UpdateParticipant and the signal UpdateMetadata path reject. * service: consolidate join grant-limit checks on the validate path Extract checkGrantLimits and run it from ValidateConnectRequest and WHIPService.validateCreate so the /rtc/validate endpoint and the WHIP ingest path reject over-limit name, metadata and attributes the same way a real join does. StartSession keeps its own checks as the backstop. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * service: run the full join limit check in StartSession StartSession now calls checkConnectLimits, so the RTC node checks identity, room name, participant name, metadata and attributes itself. ValidateConnectRequest runs the check after the publish suffix, so it measures the same identity StartSession sees. checkConnectLimits returns a plain error, and the HTTP callers map it to 400. The name-only StartSession test is dropped for TestConnectLimits, which gains a publish-suffix case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * service: test the StartSession limit check directly TestStartSessionConnectLimits runs the same over-limit cases as TestConnectLimits through StartSession on the RTC node. The cases move into an exported ConnectLimitCases table so both test packages share it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: ANDROIDHASSAN <84630851+ANDROIDHASSAN@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>