add port check

This commit is contained in:
Pete Matsyburka
2026-02-15 12:18:53 +02:00
parent bdd33c7d6b
commit a999109a5c
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ module DownloadUtils
end
def validate_uri!(uri)
raise UnableToDownload, "Error loading: #{uri}. Only HTTPS is allowed." if uri.scheme != 'https'
raise UnableToDownload, "Error loading: #{uri}. Only HTTPS is allowed." if uri.scheme != 'https' || uri.port != 443
raise UnableToDownload, "Error loading: #{uri}. Can't download from localhost." if uri.host.in?(LOCALHOSTS)
end