diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-09-19 16:53:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-19 16:53:58 +0200 |
commit | eeab3560fc0516070b3fb97e089b15ecab1938c8 (patch) | |
tree | d9abd0acac64134bed3cd4af5abdd5f375ffa3c2 | |
parent | ff32475f5f4a84ebf9619e7eef5bf8b4c075d0e2 (diff) |
Merge pull request from GHSA-v3xf-c9qf-j667
-rw-r--r-- | app/lib/tag_manager.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/lib/tag_manager.rb b/app/lib/tag_manager.rb index f1b61ff4fd6..c1bd2973ed1 100644 --- a/app/lib/tag_manager.rb +++ b/app/lib/tag_manager.rb @@ -7,18 +7,18 @@ class TagManager include RoutingHelper def web_domain?(domain) - domain.nil? || domain.delete('/').casecmp(Rails.configuration.x.web_domain).zero? + domain.nil? || domain.delete_suffix('/').casecmp(Rails.configuration.x.web_domain).zero? end def local_domain?(domain) - domain.nil? || domain.delete('/').casecmp(Rails.configuration.x.local_domain).zero? + domain.nil? || domain.delete_suffix('/').casecmp(Rails.configuration.x.local_domain).zero? end def normalize_domain(domain) return if domain.nil? uri = Addressable::URI.new - uri.host = domain.delete('/') + uri.host = domain.delete_suffix('/') uri.normalized_host end |