summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZsolt Kozaroczy <[email protected]>2023-04-12 16:51:47 +0200
committerGitHub <[email protected]>2023-04-12 16:51:47 +0200
commitbad5cac91b653848bffb4fb45326664f9d806ed2 (patch)
treee59cacf701dda3fddfcfbf2e2ae9d08862cb6191
parentff2e627de69f3c0797eb00c61e06da59d4aebd14 (diff)
parent73f72e428d2b55cc358086d460141a2c3d7d561b (diff)
downloadcaxlsx-bad5cac91b653848bffb4fb45326664f9d806ed2.tar.gz
caxlsx-bad5cac91b653848bffb4fb45326664f9d806ed2.zip
Merge pull request #194 from tagliala/security/193-use-file-read
Use File.read instead of IO.read
-rw-r--r--lib/axlsx/package.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/package.rb b/lib/axlsx/package.rb
index 6baaa173..be34788b 100644
--- a/lib/axlsx/package.rb
+++ b/lib/axlsx/package.rb
@@ -187,7 +187,7 @@ module Axlsx
end
unless part[:path].nil?
zip.put_next_entry(zip_entry_for_part(part))
- zip.write IO.read(part[:path], mode: "rb")
+ zip.write File.read(part[:path], mode: "rb")
end
end
zip