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 16, 2023
1 parent 65f2a01 commit 8c94d22
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.") unless uri.is_a?(URI::HTTP)
if username.present?
uri.user = CGI.escape(username)
uri.password = CGI.escape(password) if password
Expand Down

0 comments on commit 8c94d22

Please sign in to comment.