From 5ecf76a61147880df1226682d41b23e19a942c8c Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Wed, 22 Feb 2023 22:52:06 +0000 Subject: [PATCH] Harden plist parsing --- Library/Homebrew/formula_cellar_checks.rb | 2 +- Library/Homebrew/system_command.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb index dfdd699e6a..700ed7c0ad 100644 --- a/Library/Homebrew/formula_cellar_checks.rb +++ b/Library/Homebrew/formula_cellar_checks.rb @@ -232,7 +232,7 @@ module FormulaCellarChecks return unless prefix.directory? plist = begin - Plist.parse_xml(plist) + Plist.parse_xml(plist, marshal: false) rescue nil end diff --git a/Library/Homebrew/system_command.rb b/Library/Homebrew/system_command.rb index 4f5b68e38c..3ddd2a039b 100644 --- a/Library/Homebrew/system_command.rb +++ b/Library/Homebrew/system_command.rb @@ -357,7 +357,7 @@ class SystemCommand Regexp.last_match(1) end - Plist.parse_xml(output) + Plist.parse_xml(output, marshal: false) end end