mirror of
https://github.com/mastodon/mastodon.git
synced 2026-08-12 21:15:46 -05:00
Add support for case‑insensitive domain verification
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user