Skip to content

Conversation

edhelas
Copy link
Contributor

@edhelas edhelas commented May 13, 2025

Everything is in the title :)

Copy link
Collaborator

@Vitorinox Vitorinox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example:

$host = "sub.example.com", $adapterHost = "example.com":
Original: substr("sub.example.com", -11 + 1) = "xample.com" vs .example.com → false.
Modified: substr("sub.example.com", -11 - 1) = ".example.com" vs .example.com → true.

The change fixes the subdomain check by adjusting the substring start position to include the leading dot, ensuring accurate detection of subdomains.

@oscarotero oscarotero merged commit ede1676 into php-embed:master May 13, 2025
@oscarotero
Copy link
Collaborator

Thank you @edhelas for the change and @Vitorinox for the review!

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