-
-
Save erikh/b50b26a6e5cc2124ffee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb | |
index 0cd5692..7b5374d 100644 | |
--- a/lib/rubygems/specification.rb | |
+++ b/lib/rubygems/specification.rb | |
@@ -503,7 +503,7 @@ class Gem::Specification | |
def self.load file | |
return unless file && File.file?(file) | |
- file = file.untaint | |
+ file = file.untaint if (file.tainted? and !file.frozen?) | |
code = if defined? Encoding | |
File.read file, :encoding => "UTF-8" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment