Skip to content

Only match exact main and subdomains#555

Merged
oscarotero merged 2 commits intophp-embed:masterfrom
DieterHolvoet:issue/host-matching
May 9, 2025
Merged

Only match exact main and subdomains#555
oscarotero merged 2 commits intophp-embed:masterfrom
DieterHolvoet:issue/host-matching

Conversation

@DieterHolvoet
Copy link
Contributor

The current host matching logic in ExtractorFactory checks if the host of the inputted url ends with the host of one of the adapters. That check is too broad though, it should only check exact matches and subdomain matches. Example: shop.weeztix.com urls are considered Twitter urls, because the host ends with x.com.

@ccchapman
Copy link

+1 for this, it's biting us in production right now as our client's brand name ends in x.com.

@oscarotero oscarotero merged commit 8e0d76b into php-embed:master May 9, 2025
0 of 6 checks passed
@oscarotero
Copy link
Collaborator

Thank you!

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.

3 participants