Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP6
rubygem-activesupport-5.2
rubygem-activesupport-5.2-CVE-2023-38037.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rubygem-activesupport-5.2-CVE-2023-38037.patch of Package rubygem-activesupport-5.2
Index: activesupport-5.2.3/lib/active_support/encrypted_file.rb =================================================================== --- activesupport-5.2.3.orig/lib/active_support/encrypted_file.rb +++ activesupport-5.2.3/lib/active_support/encrypted_file.rb @@ -1,6 +1,7 @@ # frozen_string_literal: true require "pathname" +require "tempfile" require "active_support/message_encryptor" module ActiveSupport @@ -57,17 +58,16 @@ module ActiveSupport private def writing(contents) - tmp_file = "#{Process.pid}.#{content_path.basename.to_s.chomp('.enc')}" - tmp_path = Pathname.new File.join(Dir.tmpdir, tmp_file) - tmp_path.binwrite contents - - yield tmp_path - - updated_contents = tmp_path.binread - - write(updated_contents) if updated_contents != contents - ensure - FileUtils.rm(tmp_path) if tmp_path.exist? + Tempfile.create(["", "-" + content_path.basename.to_s.chomp(".enc")]) do |tmp_file| + tmp_path = Pathname.new(tmp_file) + tmp_path.binwrite contents + + yield tmp_path + + updated_contents = tmp_path.binread + + write(updated_contents) if updated_contents != contents + end end
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor