File: 0003-Remove-deprecated-untaint-method-calls.patch

package info (click to toggle)
ruby-whitewash 2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 220 kB
  • sloc: ruby: 1,217; makefile: 3
file content (30 lines) | stat: -rw-r--r-- 1,121 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From: =?utf-8?q?C=C3=A9dric_Boutillier?= <boutil@debian.org>
Date: Thu, 16 Nov 2023 23:42:55 +0100
Subject: Remove deprecated 'untaint' method calls

---
 lib/whitewash.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/whitewash.rb b/lib/whitewash.rb
index 8f1f008..38d828c 100644
--- a/lib/whitewash.rb
+++ b/lib/whitewash.rb
@@ -41,7 +41,7 @@ class Whitewash
     unless found = PATH.find {|dir| File.readable?(File.join(dir, WHITELIST)) }
       raise RuntimeError, "Can't find default whitelist"
     end
-    File.open(File.join(found, WHITELIST)) {|f| Whitewash.load(f.read.untaint) }
+    File.open(File.join(found, WHITELIST)) {|f| Whitewash.load(f.read) }
   end
 
   # _whitelist_ is expected to be loaded from xhtml.yaml.
@@ -122,7 +122,7 @@ class Whitewash
   private
 
   PATH = [ '/etc/ruby-whitewash',
-           File.join(RbConfig::CONFIG['datadir'].untaint, 'ruby-whitewash'),
+           File.join(RbConfig::CONFIG['datadir'], 'ruby-whitewash'),
            '/usr/local/share/ruby-whitewash/',
            File.expand_path('../data/whitewash/', File.dirname(__FILE__)) ]