Add support for case‑insensitive domain verification

This commit is contained in:
Goldmaster
2026-01-12 18:38:11 +00:00
parent ed17b3a7ec
commit f15092b642

View File

@@ -44,7 +44,7 @@ class Account::Field < ActiveModelSerializers::Model
parsed_url.user.nil? &&
parsed_url.password.nil? &&
parsed_url.host.present? &&
parsed_url.normalized_host == parsed_url.host &&
parsed_url.normalized_host == parsed_url.host.downcase &&
(parsed_url.path.empty? || parsed_url.path == parsed_url.normalized_path)
rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError
false