diff options
author | NAKAMURA Usaku <usa@ruby-lang.org> | 2021-05-31 23:44:23 +0900 |
---|---|---|
committer | NAKAMURA Usaku <usa@ruby-lang.org> | 2021-05-31 23:44:23 +0900 |
commit | 483f303d02e768b69e476e0b9be4ab2f26389522 (patch) | |
tree | 68f77a4256c19a306cd395f75215a6d12d4ade05 /lib | |
parent | d8bbbc308e99635091fe9c6e89ee8d711cc008b9 (diff) |
merge revision(s) a7f5d6ab88 c9ab8fe2 [Backport#17877]
a fix of RDoc for CVE-2021-31799
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rdoc/rdoc.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rdoc/rdoc.rb b/lib/rdoc/rdoc.rb index c60e017609..f356c368ff 100644 --- a/lib/rdoc/rdoc.rb +++ b/lib/rdoc/rdoc.rb @@ -430,7 +430,7 @@ The internal error was: files.reject do |file| file =~ /\.(?:class|eps|erb|scpt\.txt|svg|ttf|yml)$/i or (file =~ /tags$/i and - open(file, 'rb') { |io| + File.open(file, 'rb') { |io| io.read(100) =~ /\A(\f\n[^,]+,\d+$|!_TAG_)/ }) end |