From 40a55972295baa4fc1b0cde0211326d76b5e1567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Jaussoin?= Date: Tue, 13 May 2025 07:57:44 +0200 Subject: [PATCH 1/2] Fix the subdomain detection, substr was using a wrong offset length --- src/ExtractorFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ExtractorFactory.php b/src/ExtractorFactory.php index 9ba37e0b..4b5f1e0e 100644 --- a/src/ExtractorFactory.php +++ b/src/ExtractorFactory.php @@ -53,7 +53,7 @@ public function createExtractor(UriInterface $uri, RequestInterface $request, Re } // Check if $host is a subdomain of $adapterHost. - if (substr($host, -strlen($adapterHost) + 1) === ".{$adapterHost}") { + if (substr($host, -strlen($adapterHost) - 1) === ".{$adapterHost}") { $class = $adapter; break; } From b2ea091a5586c14ea5f2c5bf52fb0ef38e5aef87 Mon Sep 17 00:00:00 2001 From: Oscar Otero Date: Tue, 13 May 2025 14:42:29 +0200 Subject: [PATCH 2/2] new version --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26d11751..5f4b497f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [4.4.17] - 2025-05-13 +### Fixed +- Adapters hostname detection [#556]. + ## [4.4.16] - 2025-05-09 ### Fixed - Adapters hostname detection [#555]. @@ -259,7 +263,9 @@ Full library refactoring. [#551]: https://github.com/oscarotero/Embed/issues/551 [#553]: https://github.com/oscarotero/Embed/issues/553 [#555]: https://github.com/oscarotero/Embed/issues/555 +[#556]: https://github.com/oscarotero/Embed/issues/556 +[4.4.17]: https://github.com/oscarotero/Embed/compare/v4.4.16...v4.4.17 [4.4.16]: https://github.com/oscarotero/Embed/compare/v4.4.15...v4.4.16 [4.4.15]: https://github.com/oscarotero/Embed/compare/v4.4.14...v4.4.15 [4.4.14]: https://github.com/oscarotero/Embed/compare/v4.4.13...v4.4.14