Skip to content

SIP authentication: compare IP masks against remote address rather than From header. - #1889

Open
alexfish8 wants to merge 3 commits into
mainfrom
afish/ip-fix
Open

alexfish8 wants to merge 3 commits into
mainfrom
afish/ip-fix

Conversation

@alexfish8

Copy link
Copy Markdown
Contributor

Currently, a trunk's allowed addresses can be matched against the From hostname or the remote address of the request. The current implementation is problematic, as each whitelisted address/hostname of a trunk is first compared against the From header and then compared against the source IP. Consider the following situation:

trunk_allowlist: [192.168.0.1/32]
request:
  source_ip: 1.2.3.4
  from: 192.168.0.1

This request would be allowed through, even though it's actual IP does not match the allowlist entry.

This PR fixes this bug by ensuring that all IP or IP-prefix allowlist entries are only matched against a request's source IP, and not the request's from hostname.

@changeset-bot

changeset-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8fc995e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
github.com/livekit/protocol Patch
@livekit/protocol Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant