From e629d12fe3a629259d5586e095bacd5134f77d68 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Tue, 14 Nov 2023 09:36:22 -0500 Subject: [PATCH] Fixes #36919 - Add URL validation to HTTP Proxy URL field. --- app/models/http_proxy.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/http_proxy.rb b/app/models/http_proxy.rb index 1cb27e8c3136..8302a47bb0b8 100644 --- a/app/models/http_proxy.rb +++ b/app/models/http_proxy.rb @@ -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