From 8c94d22563fb57b4f17cd1e6493ee7079ca97896 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..9dfb147f0a6e 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) + 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