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 14, 2023
1 parent 65f2a01 commit e629d12
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)
fail URI::InvalidURIError 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 e629d12

Please sign in to comment.