rubygems-update 3.2.19 → 3.2.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Manifest.txt +1 -0
- data/bundler/CHANGELOG.md +16 -0
- data/bundler/bundler.gemspec +1 -1
- data/bundler/lib/bundler/build_metadata.rb +2 -2
- data/bundler/lib/bundler/cli/check.rb +4 -2
- data/bundler/lib/bundler/cli/outdated.rb +2 -0
- data/bundler/lib/bundler/definition.rb +6 -0
- data/bundler/lib/bundler/fetcher/index.rb +0 -1
- data/bundler/lib/bundler/friendly_errors.rb +1 -3
- data/bundler/lib/bundler/rubygems_integration.rb +4 -3
- data/bundler/lib/bundler/source.rb +2 -0
- data/bundler/lib/bundler/source/rubygems.rb +6 -0
- data/bundler/lib/bundler/source_list.rb +4 -0
- data/bundler/lib/bundler/version.rb +1 -1
- data/lib/rubygems.rb +1 -1
- data/lib/rubygems/installer.rb +4 -0
- data/lib/rubygems/specification_policy.rb +5 -4
- data/lib/rubygems/test_case.rb +4 -0
- data/rubygems-update.gemspec +1 -1
- data/test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem +0 -0
- data/test/rubygems/test_gem_bundler_version_finder.rb +1 -3
- data/test/rubygems/test_gem_dependency.rb +6 -0
- data/test/rubygems/test_gem_installer.rb +20 -0
- data/test/rubygems/test_gem_specification.rb +3 -3
- data/test/rubygems/test_kernel.rb +2 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: beb9904852db18bc2cb58e157631c112d2951ea7df0bac7f63a1838ffba5ddbc
|
4
|
+
data.tar.gz: a987e2d21ffd319e2dc0c0ae4d913b5f1d3ad6480783addbc4faaee5ad540b86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc88c86f3691d8b07ce12056d0f1e762de188fe3775d3f80a83c2912020ed039b34ce50e95e118bfe8f6077cdb6ced949cb9c6147699292c6f45e3703b5e0087
|
7
|
+
data.tar.gz: a91aa086be326926df974bbf2734c94e9ee1dfebc1e1b0a23474d64156c46249448e398baaf38fa4fedbdb2e006fd40ef94949112271842a89a1adc2a1b952a9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# 3.2.20 / 2021-06-11
|
2
|
+
|
3
|
+
## Security fixes:
|
4
|
+
|
5
|
+
* Verify plaform before installing to avoid potential remote code
|
6
|
+
execution. Pull request #4667 by sonalkr132
|
7
|
+
|
8
|
+
## Enhancements:
|
9
|
+
|
10
|
+
* Add better specification policy error description. Pull request #4658 by
|
11
|
+
ceritium
|
12
|
+
|
1
13
|
# 3.2.19 / 2021-05-31
|
2
14
|
|
3
15
|
## Enhancements:
|
data/Manifest.txt
CHANGED
@@ -538,6 +538,7 @@ test/rubygems/invalidchild_cert.pem
|
|
538
538
|
test/rubygems/invalidchild_cert_32.pem
|
539
539
|
test/rubygems/invalidchild_key.pem
|
540
540
|
test/rubygems/packages/ascii_binder-0.1.10.1.gem
|
541
|
+
test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem
|
541
542
|
test/rubygems/plugin/exception/rubygems_plugin.rb
|
542
543
|
test/rubygems/plugin/load/rubygems_plugin.rb
|
543
544
|
test/rubygems/plugin/standarderror/rubygems_plugin.rb
|
data/bundler/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
# 2.2.20 (June 11, 2021)
|
2
|
+
|
3
|
+
## Enhancements:
|
4
|
+
|
5
|
+
- Don't print bug report template on server side errors [#4663](https://github.com/rubygems/rubygems/pull/4663)
|
6
|
+
- Don't load `resolv` unnecessarily [#4640](https://github.com/rubygems/rubygems/pull/4640)
|
7
|
+
|
8
|
+
## Bug fixes:
|
9
|
+
|
10
|
+
- Fix `bundle outdated` edge case [#4648](https://github.com/rubygems/rubygems/pull/4648)
|
11
|
+
- Fix `bundle check` with scoped rubygems sources [#4639](https://github.com/rubygems/rubygems/pull/4639)
|
12
|
+
|
13
|
+
## Performance:
|
14
|
+
|
15
|
+
- Don't use `extra_rdoc_files` with md files in gemspec to make installing bundler with docs faster [#4628](https://github.com/rubygems/rubygems/pull/4628)
|
16
|
+
|
1
17
|
# 2.2.19 (May 31, 2021)
|
2
18
|
|
3
19
|
## Bug fixes:
|
data/bundler/bundler.gemspec
CHANGED
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
|
|
39
39
|
# include the gemspec itself because warbler breaks w/o it
|
40
40
|
s.files += %w[bundler.gemspec]
|
41
41
|
|
42
|
-
s.
|
42
|
+
s.files += %w[CHANGELOG.md LICENSE.md README.md]
|
43
43
|
s.bindir = "exe"
|
44
44
|
s.executables = %w[bundle bundler]
|
45
45
|
s.require_paths = ["lib"]
|
@@ -4,8 +4,8 @@ module Bundler
|
|
4
4
|
# Represents metadata from when the Bundler gem was built.
|
5
5
|
module BuildMetadata
|
6
6
|
# begin ivars
|
7
|
-
@built_at = "2021-
|
8
|
-
@git_commit_sha = "
|
7
|
+
@built_at = "2021-06-11".freeze
|
8
|
+
@git_commit_sha = "4c510a34a4".freeze
|
9
9
|
@release = true
|
10
10
|
# end ivars
|
11
11
|
|
@@ -11,9 +11,11 @@ module Bundler
|
|
11
11
|
def run
|
12
12
|
Bundler.settings.set_command_option_if_given :path, options[:path]
|
13
13
|
|
14
|
+
definition = Bundler.definition
|
15
|
+
definition.validate_runtime!
|
16
|
+
|
14
17
|
begin
|
15
|
-
definition
|
16
|
-
definition.validate_runtime!
|
18
|
+
definition.resolve_only_locally!
|
17
19
|
not_installed = definition.missing_specs
|
18
20
|
rescue GemNotFound, VersionConflict
|
19
21
|
Bundler.ui.error "Bundler can't satisfy your Gemfile's dependencies."
|
@@ -147,6 +147,8 @@ module Bundler
|
|
147
147
|
|
148
148
|
def retrieve_active_spec(definition, current_spec)
|
149
149
|
active_spec = definition.resolve.find_by_name_and_platform(current_spec.name, current_spec.platform)
|
150
|
+
return unless active_spec
|
151
|
+
|
150
152
|
return active_spec if strict
|
151
153
|
|
152
154
|
active_specs = active_spec.source.specs.search(current_spec.name).select {|spec| spec.match_platform(current_spec.platform) }.sort_by(&:version)
|
@@ -49,8 +49,6 @@ module Bundler
|
|
49
49
|
"Alternatively, you can increase the amount of memory the JVM is able to use by running Bundler with jruby -J-Xmx1024m -S bundle (JRuby defaults to 500MB)."
|
50
50
|
else request_issue_report_for(error)
|
51
51
|
end
|
52
|
-
rescue StandardError
|
53
|
-
raise error
|
54
52
|
end
|
55
53
|
|
56
54
|
def exit_status(error)
|
@@ -111,7 +109,7 @@ module Bundler
|
|
111
109
|
First, try this link to see if there are any existing issue reports for this error:
|
112
110
|
#{issues_url(e)}
|
113
111
|
|
114
|
-
If there aren't any reports for this error yet, please
|
112
|
+
If there aren't any reports for this error yet, please copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at:
|
115
113
|
https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md
|
116
114
|
EOS
|
117
115
|
end
|
@@ -526,13 +526,14 @@ module Bundler
|
|
526
526
|
Bundler::Retry.new("download gem from #{uri}").attempts do
|
527
527
|
fetcher.download(spec, uri, path)
|
528
528
|
end
|
529
|
+
rescue Gem::RemoteFetcher::FetchError => e
|
530
|
+
raise Bundler::HTTPError, "Could not download gem from #{uri} due to underlying error <#{e.message}>"
|
529
531
|
end
|
530
532
|
|
531
533
|
def gem_remote_fetcher
|
532
|
-
require "
|
534
|
+
require "rubygems/remote_fetcher"
|
533
535
|
proxy = configuration[:http_proxy]
|
534
|
-
|
535
|
-
Gem::RemoteFetcher.new(proxy, dns)
|
536
|
+
Gem::RemoteFetcher.new(proxy)
|
536
537
|
end
|
537
538
|
|
538
539
|
def gem_from_path(path, policy = nil)
|
data/lib/rubygems.rb
CHANGED
data/lib/rubygems/installer.rb
CHANGED
@@ -728,6 +728,10 @@ class Gem::Installer
|
|
728
728
|
raise Gem::InstallError, "#{spec} has an invalid extensions"
|
729
729
|
end
|
730
730
|
|
731
|
+
if spec.platform.to_s =~ /\R/
|
732
|
+
raise Gem::InstallError, "#{spec.platform} is an invalid platform"
|
733
|
+
end
|
734
|
+
|
731
735
|
unless spec.specification_version.to_s =~ /\A\d+\z/
|
732
736
|
raise Gem::InstallError, "#{spec} has an invalid specification_version"
|
733
737
|
end
|
@@ -124,25 +124,26 @@ class Gem::SpecificationPolicy
|
|
124
124
|
end
|
125
125
|
|
126
126
|
metadata.each do |key, value|
|
127
|
+
entry = "metadata['#{key}']"
|
127
128
|
if !key.kind_of?(String)
|
128
129
|
error "metadata keys must be a String"
|
129
130
|
end
|
130
131
|
|
131
132
|
if key.size > 128
|
132
|
-
error "metadata key too large (#{key.size} > 128)"
|
133
|
+
error "metadata key is too large (#{key.size} > 128)"
|
133
134
|
end
|
134
135
|
|
135
136
|
if !value.kind_of?(String)
|
136
|
-
error "
|
137
|
+
error "#{entry} value must be a String"
|
137
138
|
end
|
138
139
|
|
139
140
|
if value.size > 1024
|
140
|
-
error "
|
141
|
+
error "#{entry} value is too large (#{value.size} > 1024)"
|
141
142
|
end
|
142
143
|
|
143
144
|
if METADATA_LINK_KEYS.include? key
|
144
145
|
if value !~ VALID_URI_PATTERN
|
145
|
-
error "
|
146
|
+
error "#{entry} has invalid link: #{value.inspect}"
|
146
147
|
end
|
147
148
|
end
|
148
149
|
end
|
data/lib/rubygems/test_case.rb
CHANGED
@@ -553,6 +553,10 @@ class Gem::TestCase < Test::Unit::TestCase
|
|
553
553
|
Gem.pre_uninstall_hooks.clear
|
554
554
|
end
|
555
555
|
|
556
|
+
def without_any_upwards_gemfiles
|
557
|
+
ENV["BUNDLE_GEMFILE"] = File.join(@tempdir, "Gemfile")
|
558
|
+
end
|
559
|
+
|
556
560
|
##
|
557
561
|
# A git_gem is used with a gem dependencies file. The gem created here
|
558
562
|
# has no files, just a gem specification for the given +name+ and +version+.
|
data/rubygems-update.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "rubygems-update"
|
5
|
-
s.version = "3.2.
|
5
|
+
s.version = "3.2.20"
|
6
6
|
s.authors = ["Jim Weirich", "Chad Fowler", "Eric Hodel", "Luis Lavena", "Aaron Patterson", "Samuel Giddins", "André Arko", "Evan Phoenix", "Hiroshi SHIBATA"]
|
7
7
|
s.email = ["", "", "drbrain@segment7.net", "luislavena@gmail.com", "aaron@tenderlovemaking.com", "segiddins@segiddins.me", "andre@arko.net", "evan@phx.io", "hsbt@ruby-lang.org"]
|
8
8
|
|
Binary file
|
@@ -6,14 +6,12 @@ class TestGemBundlerVersionFinder < Gem::TestCase
|
|
6
6
|
super
|
7
7
|
|
8
8
|
@argv = ARGV.dup
|
9
|
-
@env = ENV.to_hash.clone
|
10
|
-
ENV.delete("BUNDLER_VERSION")
|
11
9
|
@dollar_0 = $0
|
10
|
+
without_any_upwards_gemfiles
|
12
11
|
end
|
13
12
|
|
14
13
|
def teardown
|
15
14
|
ARGV.replace @argv
|
16
|
-
ENV.replace @env
|
17
15
|
$0 = @dollar_0
|
18
16
|
|
19
17
|
super
|
@@ -1776,6 +1776,26 @@ gem 'other', version
|
|
1776
1776
|
end
|
1777
1777
|
end
|
1778
1778
|
|
1779
|
+
def test_pre_install_checks_malicious_platform_before_eval
|
1780
|
+
gem_with_ill_formated_platform = File.expand_path("packages/ill-formatted-platform-1.0.0.10.gem", __dir__)
|
1781
|
+
|
1782
|
+
installer = Gem::Installer.at(
|
1783
|
+
gem_with_ill_formated_platform,
|
1784
|
+
:install_dir => @gem_home,
|
1785
|
+
:user_install => false,
|
1786
|
+
:force => true
|
1787
|
+
)
|
1788
|
+
|
1789
|
+
use_ui @ui do
|
1790
|
+
e = assert_raise Gem::InstallError do
|
1791
|
+
installer.pre_install_checks
|
1792
|
+
end
|
1793
|
+
|
1794
|
+
assert_equal "x86-mswin32\n system('id > /tmp/nyangawa')# is an invalid platform", e.message
|
1795
|
+
assert_empty @ui.output
|
1796
|
+
end
|
1797
|
+
end
|
1798
|
+
|
1779
1799
|
def test_shebang
|
1780
1800
|
installer = setup_base_installer
|
1781
1801
|
|
@@ -3612,7 +3612,7 @@ Did you mean 'Ruby'?
|
|
3612
3612
|
@m2.validate
|
3613
3613
|
end
|
3614
3614
|
|
3615
|
-
assert_equal "metadata key too large (129 > 128)", e.message
|
3615
|
+
assert_equal "metadata key is too large (129 > 128)", e.message
|
3616
3616
|
end
|
3617
3617
|
end
|
3618
3618
|
|
@@ -3629,7 +3629,7 @@ Did you mean 'Ruby'?
|
|
3629
3629
|
@m2.validate
|
3630
3630
|
end
|
3631
3631
|
|
3632
|
-
assert_equal "metadata
|
3632
|
+
assert_equal "metadata['fail'] value must be a String", e.message
|
3633
3633
|
end
|
3634
3634
|
end
|
3635
3635
|
|
@@ -3646,7 +3646,7 @@ Did you mean 'Ruby'?
|
|
3646
3646
|
@m2.validate
|
3647
3647
|
end
|
3648
3648
|
|
3649
|
-
assert_equal "metadata value too large (1025 > 1024)", e.message
|
3649
|
+
assert_equal "metadata['fail'] value is too large (1025 > 1024)", e.message
|
3650
3650
|
end
|
3651
3651
|
end
|
3652
3652
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Weirich
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2021-
|
19
|
+
date: 2021-06-11 00:00:00.000000000 Z
|
20
20
|
dependencies: []
|
21
21
|
description: |-
|
22
22
|
A package (also known as a library) contains a set of functionality
|
@@ -594,6 +594,7 @@ files:
|
|
594
594
|
- test/rubygems/invalidchild_cert_32.pem
|
595
595
|
- test/rubygems/invalidchild_key.pem
|
596
596
|
- test/rubygems/packages/ascii_binder-0.1.10.1.gem
|
597
|
+
- test/rubygems/packages/ill-formatted-platform-1.0.0.10.gem
|
597
598
|
- test/rubygems/plugin/exception/rubygems_plugin.rb
|
598
599
|
- test/rubygems/plugin/load/rubygems_plugin.rb
|
599
600
|
- test/rubygems/plugin/standarderror/rubygems_plugin.rb
|
@@ -771,7 +772,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
771
772
|
- !ruby/object:Gem::Version
|
772
773
|
version: '0'
|
773
774
|
requirements: []
|
774
|
-
rubygems_version: 3.2.
|
775
|
+
rubygems_version: 3.2.20
|
775
776
|
signing_key:
|
776
777
|
specification_version: 4
|
777
778
|
summary: RubyGems is a package management framework for Ruby.
|