diff --git a/gems/aws-sdk-core/CHANGELOG.md b/gems/aws-sdk-core/CHANGELOG.md index eaaaef73bc4..e4f4de54b7c 100644 --- a/gems/aws-sdk-core/CHANGELOG.md +++ b/gems/aws-sdk-core/CHANGELOG.md @@ -1,6 +1,8 @@ Unreleased Changes ------------------ +* Issue - Fix host label validation in endpoint matchers. + 3.181.0 (2023-08-22) ------------------ diff --git a/gems/aws-sdk-core/lib/aws-sdk-core/endpoints/matchers.rb b/gems/aws-sdk-core/lib/aws-sdk-core/endpoints/matchers.rb index 5c6bf2c04d7..9ae20e18d59 100644 --- a/gems/aws-sdk-core/lib/aws-sdk-core/endpoints/matchers.rb +++ b/gems/aws-sdk-core/lib/aws-sdk-core/endpoints/matchers.rb @@ -79,11 +79,11 @@ def self.valid_host_label?(value, allow_sub_domains = false) return false if value.empty? if allow_sub_domains - labels = value.split('.') + labels = value.split('.', -1) return labels.all? { |l| valid_host_label?(l) } end - value =~ /\A(?!-)[a-zA-Z0-9-]{1,63}(?