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 21, 2023
1 parent 7493355 commit 7e98f22
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/http_proxies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ def edit

def test_connection
http_proxy = HttpProxy.new(http_proxy_params)
unless http_proxy.valid?
raise Foreman::Exception, http_proxy.errors.full_messages.join(', ')
end

http_proxy.test_connection(params[:test_url])

render :json => {:status => 'success', :message => _("HTTP Proxy connection successful.")}, :status => :ok
Expand Down

0 comments on commit 7e98f22

Please sign in to comment.