Skip to content

Commit

Permalink
Fixes #36919 - Add URL validation to HTTP Proxy URL field.
Browse files Browse the repository at this point in the history
  • Loading branch information
chris1984 committed Nov 17, 2023
1 parent 7493355 commit a18bf52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/http_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class HttpProxy < ApplicationRecord

def full_url
uri = URI(url)
raise URI::InvalidURIError, _("Please enter a valid proxy URL. ") if !uri.is_a?(URI::HTTP) || uri.host.nil?
if username.present?
uri.user = CGI.escape(username)
uri.password = CGI.escape(password) if password
Expand Down

0 comments on commit a18bf52

Please sign in to comment.