From 14a11f5c72177930200bd5c3a0d48daeebb183f1 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 20 Feb 2023 10:03:23 +0000 Subject: [PATCH] formulary: use default bottle root_url. We never change this value in `formula.json` so ignore it for security. --- Library/Homebrew/formulary.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index af0b3df0a7a03..c906b4ea9709c 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -168,11 +168,10 @@ def self.load_formula_from_api(name, flags:) if (bottles_stable = json_formula["bottle"]["stable"]).present? bottle do - if Homebrew::EnvConfig.bottle_domain != HOMEBREW_BOTTLE_DEFAULT_DOMAIN \ - && bottles_stable["root_url"] == HOMEBREW_BOTTLE_DEFAULT_DOMAIN - root_url Homebrew::EnvConfig.bottle_domain + if Homebrew::EnvConfig.bottle_domain == HOMEBREW_BOTTLE_DEFAULT_DOMAIN + root_url HOMEBREW_BOTTLE_DEFAULT_DOMAIN else - root_url bottles_stable["root_url"] + root_url Homebrew::EnvConfig.bottle_domain end rebuild bottles_stable["rebuild"] bottles_stable["files"].each do |tag, bottle_spec|