about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-11-22 11:25:59 +0100
committerGitHub <noreply@github.com>2022-11-22 11:25:59 +0100
commitbdc61d467d704a0fff358e46d2bf7acba9c9269e (patch)
treed8b6e5807bb722fc92087bc6c52679ad92e8e2b2 /app/models
parente0e7a09cfed2b311f055522eea45caac0838d87a (diff)
parentff42233aaeed91f8c14da150c7241d3d0b72841f (diff)
Merge pull request #1966 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account/field.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/account/field.rb b/app/models/account/field.rb
index ffc8dce80..4db4cac30 100644
--- a/app/models/account/field.rb
+++ b/app/models/account/field.rb
@@ -46,7 +46,8 @@ 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 &&
+      (parsed_url.path.empty? || parsed_url.path == parsed_url.normalized_path)
   rescue Addressable::URI::InvalidURIError, IDN::Idna::IdnaError
     false
   end