From 19a4cd9ee5d7a3cd0e89b5d027fb597c86bae7ab Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 18 Sep 2026 09:22:15 +0900 Subject: [PATCH 01/13] Merge pull request #9889 from ruby/claude/friendly-lichterman-aca4f1 Keep the local socket servers up when a client disconnects (cherry picked from commit 9255a059075b565995745245881dec1057774b2d) --- .../gemcutter_utilities/webauthn_listener.rb | 9 +++++++ test/rubygems/local_ssl_server_utilities.rb | 8 +++--- .../test_gem_remote_fetcher_local_server.rb | 26 +++++++++++++++++++ ...est_gem_remote_fetcher_local_ssl_server.rb | 16 ++++++++++++ test/rubygems/test_webauthn_listener.rb | 15 +++++++++++ 5 files changed, 71 insertions(+), 3 deletions(-) diff --git a/lib/rubygems/gemcutter_utilities/webauthn_listener.rb b/lib/rubygems/gemcutter_utilities/webauthn_listener.rb index 3f56a077c9bb..2933fa0dfbb0 100644 --- a/lib/rubygems/gemcutter_utilities/webauthn_listener.rb +++ b/lib/rubygems/gemcutter_utilities/webauthn_listener.rb @@ -50,6 +50,13 @@ def wait_for_otp_code(server) socket = server.accept request_line = socket.gets + # Browsers open connections speculatively and close them again without + # ever sending a request, so wait for the one that carries the code. + unless request_line + socket.close + next + end + method, req_uri, _protocol = request_line.split(" ") req_uri = Gem::URI.parse(req_uri) @@ -75,6 +82,8 @@ def wait_for_otp_code(server) responder.send(MethodNotAllowedResponse.for(host)) raise Gem::WebauthnVerificationError, "Invalid HTTP method #{method.upcase} received." end + rescue Errno::ECONNABORTED, Errno::ECONNRESET + socket&.close end end diff --git a/test/rubygems/local_ssl_server_utilities.rb b/test/rubygems/local_ssl_server_utilities.rb index a068efa9642d..dbb90d95a650 100644 --- a/test/rubygems/local_ssl_server_utilities.rb +++ b/test/rubygems/local_ssl_server_utilities.rb @@ -60,8 +60,8 @@ def start_ssl_server(config = {}) ensure client.close end - rescue OpenSSL::SSL::SSLError - # Ignore SSL errors because we're testing them implicitly + rescue OpenSSL::SSL::SSLError, Errno::ECONNABORTED, Errno::ECONNRESET + # Ignore handshake failures the client causes; a reset arrives as Errno, not SSLError end end @ssl_server @@ -132,7 +132,9 @@ def self.probe_pqc_handshake server_thread = Thread.new do client = ssl_server.accept client.close - rescue OpenSSL::OpenSSLError + rescue StandardError + # The client side below decides the verdict, and the join in ensure would + # re-raise anything left here past this method's own rescue. nil end diff --git a/test/rubygems/test_gem_remote_fetcher_local_server.rb b/test/rubygems/test_gem_remote_fetcher_local_server.rb index 3d3e8b503b1a..3f45880934e1 100644 --- a/test/rubygems/test_gem_remote_fetcher_local_server.rb +++ b/test/rubygems/test_gem_remote_fetcher_local_server.rb @@ -104,6 +104,28 @@ def teardown @proxies.each_with_index {|k, i| ENV[k] = @old_proxies[i] } end + def test_server_survives_client_connection_reset + socket = TCPSocket.new("localhost", @normal_server[:server].addr[1]) + socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER, [1, 0].pack("ii")) + socket.close + + assert_nil @normal_server.join(1), "the server stopped accepting connections" + + use_ui @stub_ui do + assert_data_from_server @fetcher.fetch_path(@server_uri) + end + end + + def test_server_survives_client_hanging_up_without_a_request + TCPSocket.new("localhost", @normal_server[:server].addr[1]).close + + assert_nil @normal_server.join(1), "the server stopped accepting connections" + + use_ui @stub_ui do + assert_data_from_server @fetcher.fetch_path(@server_uri) + end + end + def test_no_proxy use_ui @stub_ui do assert_data_from_server @fetcher.fetch_path(@server_uri) @@ -193,6 +215,7 @@ def start_server(data) loop do client = server.accept handle_request(client, data) + rescue Errno::ECONNABORTED, Errno::ECONNRESET end end thread[:server] = server @@ -201,6 +224,8 @@ def start_server(data) def handle_request(client, data) request_line = client.gets + return unless request_line + headers = {} while (line = client.gets) && line != "\r\n" key, value = line.split(": ", 2) @@ -215,6 +240,7 @@ def handle_request(client, data) else client.print "HTTP/1.1 404 Not Found\r\nContent-Type: text/html\r\n\r\n

NOT FOUND

" end + ensure client.close end end diff --git a/test/rubygems/test_gem_remote_fetcher_local_ssl_server.rb b/test/rubygems/test_gem_remote_fetcher_local_ssl_server.rb index 95e6d3ac65a8..6a617cb36621 100644 --- a/test/rubygems/test_gem_remote_fetcher_local_ssl_server.rb +++ b/test/rubygems/test_gem_remote_fetcher_local_ssl_server.rb @@ -32,6 +32,22 @@ def test_ssl_connection end end + def test_ssl_server_survives_client_connection_reset + ssl_server = start_ssl_server + port = ssl_server.addr[1] + + socket = TCPSocket.new("localhost", port) + socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER, [1, 0].pack("ii")) + socket.close + + assert_nil @ssl_server_thread.join(1), "the SSL server stopped accepting connections" + + temp_ca_cert = File.join(certs_dir, "ca_cert.pem") + with_configured_fetcher(":ssl_ca_cert: #{temp_ca_cert}") do |fetcher| + fetcher.fetch_path("https://localhost:#{port}/yaml") + end + end + def test_pqc_ssl_connection omit_unless_support_pqc diff --git a/test/rubygems/test_webauthn_listener.rb b/test/rubygems/test_webauthn_listener.rb index ded41289285c..48408926b65f 100644 --- a/test/rubygems/test_webauthn_listener.rb +++ b/test/rubygems/test_webauthn_listener.rb @@ -25,6 +25,21 @@ def test_listener_thread_retrieves_otp_code assert_equal "xyz", thread[:otp] end + def test_listener_thread_ignores_a_connection_without_a_request + @thread = Gem::GemcutterUtilities::WebauthnListener.listener_thread(Gem.host, @server) + + TCPSocket.new("localhost", @port).close + + socket = TCPSocket.new("localhost", @port) + socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_LINGER, [1, 0].pack("ii")) + socket.close + + Gem::MockBrowser.get Gem::URI("http://localhost:#{@port}?code=xyz") + + @thread.join + assert_equal "xyz", @thread[:otp] + end + def test_listener_thread_sets_error thread = Gem::GemcutterUtilities::WebauthnListener.listener_thread(Gem.host, @server) Gem::MockBrowser.post Gem::URI("http://localhost:#{@port}?code=xyz") From f2c706f24f5debdeacf9af46b482ecd8652ca540 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 18 Sep 2026 11:11:47 +0900 Subject: [PATCH 02/13] Merge pull request #9890 from ruby/claude/compassionate-turing-d23024 Validate the version field in Gem::Installer#verify_spec (cherry picked from commit b2dd6b7918c16187d40f04b4124ec82c5e8dc07e) --- lib/rubygems/installer.rb | 4 +++ test/rubygems/test_gem_installer.rb | 40 +++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 20a8351d94b2..f3108956940e 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -684,6 +684,10 @@ def verify_spec raise Gem::InstallError, "#{spec} has an invalid name" end + unless /\A#{Gem::Version::VERSION_PATTERN}\z/.match?(spec.version.to_s) + raise Gem::InstallError, "#{spec} has an invalid version" + end + if spec.raw_require_paths.any? {|path| path =~ /\R/ } raise Gem::InstallError, "#{spec} has an invalid require_paths" end diff --git a/test/rubygems/test_gem_installer.rb b/test/rubygems/test_gem_installer.rb index be6e3dffd0aa..5075a68544bb 100644 --- a/test/rubygems/test_gem_installer.rb +++ b/test/rubygems/test_gem_installer.rb @@ -1873,6 +1873,46 @@ def spec.validate(*args); end refute defined?(::Object::FROM_EVAL) end + # Psych restores a version from gem metadata through + # Gem::Version#yaml_initialize, which skips the checks in #initialize. + def test_pre_install_checks_malicious_version_before_eval + spec = util_spec "malicious", "1" + def spec.validate(*args); end + version = Gem::Version.allocate + version.yaml_initialize nil, "version" => "1\n::Object.const_set(:FROM_EVAL, true)#" + spec.version = version + + installer = Gem::Installer.for_spec spec + installer.gem_home = @gemhome + + use_ui @ui do + e = assert_raise Gem::InstallError do + installer.pre_install_checks + end + assert_equal "# has an invalid version", e.message + end + refute defined?(::Object::FROM_EVAL) + end + + def test_pre_install_checks_accepts_real_versions + %w[1 1.0.0 1.0.0.a 1.0.0-rc.1 0.1.0.pre.20260918].each do |version| + spec = util_spec "a", version + + util_build_gem spec + + installer = Gem::Installer.at spec.cache_file, + install_dir: @gemhome, + user_install: false, + force: true + + use_ui @ui do + assert_equal spec, installer.install, version + end + + assert_path_exist File.join(@gemhome, "gems", spec.full_name), version + end + end + def test_pre_install_checks_malicious_require_paths_before_eval spec = util_spec "malicious", "1" def spec.full_name # so the spec is buildable From 6e0e9a99eba3d6fcd492b40023ce2d1cd57fa605 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 18 Sep 2026 11:25:18 +0900 Subject: [PATCH 03/13] Merge pull request #9891 from ruby/claude/goofy-lichterman-7444ad Describe `--major` as preferring the latest major version (cherry picked from commit 81b4c9627df5ded2a1886e92019c3dd031d17f4d) --- bundler/lib/bundler/cli.rb | 6 +++--- bundler/lib/bundler/man/bundle-lock.1 | 2 +- bundler/lib/bundler/man/bundle-lock.1.ronn | 2 +- bundler/lib/bundler/man/bundle-outdated.1 | 2 +- bundler/lib/bundler/man/bundle-outdated.1.ronn | 2 +- bundler/lib/bundler/man/bundle-update.1 | 4 ++-- bundler/lib/bundler/man/bundle-update.1.ronn | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bundler/lib/bundler/cli.rb b/bundler/lib/bundler/cli.rb index 336ca72192b0..ab5f28474c66 100644 --- a/bundler/lib/bundler/cli.rb +++ b/bundler/lib/bundler/cli.rb @@ -320,7 +320,7 @@ def install method_option "bundler", type: :string, lazy_default: ">= #{Bundler::VERSION}", banner: "Update the locked version of bundler" method_option "patch", type: :boolean, banner: "Prefer updating only to next patch version" method_option "minor", type: :boolean, banner: "Prefer updating only to next minor version" - method_option "major", type: :boolean, banner: "Prefer updating to next major version (default)" + method_option "major", type: :boolean, banner: "Prefer updating to latest major version (default)" method_option "pre", type: :boolean, banner: "Always choose the highest allowed version when updating gems, regardless of prerelease status" method_option "strict", type: :boolean, banner: "Do not allow any gem to be updated past latest --patch | --minor | --major" method_option "conservative", type: :boolean, banner: "Use bundle install conservative update behavior and do not allow shared dependencies to be updated." @@ -431,7 +431,7 @@ def add(*gems) method_option "filter-strict", type: :boolean, aliases: "--strict", banner: "Only list newer versions allowed by your Gemfile requirements" method_option "update-strict", type: :boolean, banner: "Strict conservative resolution, do not allow any gem to be updated past latest --patch | --minor | --major" method_option "minor", type: :boolean, banner: "Prefer updating only to next minor version" - method_option "major", type: :boolean, banner: "Prefer updating to next major version (default)" + method_option "major", type: :boolean, banner: "Prefer updating to latest major version (default)" method_option "patch", type: :boolean, banner: "Prefer updating only to next patch version" method_option "filter-major", type: :boolean, banner: "Only list major newer versions" method_option "filter-minor", type: :boolean, banner: "Only list minor newer versions" @@ -638,7 +638,7 @@ def inject(*) method_option "normalize-platforms", type: :boolean, default: false, banner: "Normalize lockfile platforms" method_option "patch", type: :boolean, banner: "If updating, prefer updating only to next patch version" method_option "minor", type: :boolean, banner: "If updating, prefer updating only to next minor version" - method_option "major", type: :boolean, banner: "If updating, prefer updating to next major version (default)" + method_option "major", type: :boolean, banner: "If updating, prefer updating to latest major version (default)" method_option "pre", type: :boolean, banner: "If updating, always choose the highest allowed version, regardless of prerelease status" method_option "strict", type: :boolean, banner: "If updating, do not allow any gem to be updated past latest --patch | --minor | --major" method_option "conservative", type: :boolean, banner: "If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated" diff --git a/bundler/lib/bundler/man/bundle-lock.1 b/bundler/lib/bundler/man/bundle-lock.1 index 130b50fe0675..bee43ab3af70 100644 --- a/bundler/lib/bundler/man/bundle-lock.1 +++ b/bundler/lib/bundler/man/bundle-lock.1 @@ -49,7 +49,7 @@ If updating, prefer updating only to next patch version\. If updating, prefer updating only to next minor version\. .TP \fB\-\-major\fR -If updating, prefer updating to next major version (default)\. +If updating, prefer updating to latest major version (default)\. .TP \fB\-\-pre\fR If updating, always choose the highest allowed version, regardless of prerelease status\. diff --git a/bundler/lib/bundler/man/bundle-lock.1.ronn b/bundler/lib/bundler/man/bundle-lock.1.ronn index 96c37a66b7e4..a74747d518ed 100644 --- a/bundler/lib/bundler/man/bundle-lock.1.ronn +++ b/bundler/lib/bundler/man/bundle-lock.1.ronn @@ -75,7 +75,7 @@ Lock the gems specified in Gemfile. If updating, prefer updating only to next minor version. * `--major`: - If updating, prefer updating to next major version (default). + If updating, prefer updating to latest major version (default). * `--pre`: If updating, always choose the highest allowed version, regardless of prerelease status. diff --git a/bundler/lib/bundler/man/bundle-outdated.1 b/bundler/lib/bundler/man/bundle-outdated.1 index 5118a377569c..9eb62f41e86b 100644 --- a/bundler/lib/bundler/man/bundle-outdated.1 +++ b/bundler/lib/bundler/man/bundle-outdated.1 @@ -37,7 +37,7 @@ List gems organized by groups\. Prefer updating only to next minor version\. .TP \fB\-\-major\fR -Prefer updating to next major version (default)\. +Prefer updating to latest major version (default)\. .TP \fB\-\-patch\fR Prefer updating only to next patch version\. diff --git a/bundler/lib/bundler/man/bundle-outdated.1.ronn b/bundler/lib/bundler/man/bundle-outdated.1.ronn index 468b84d057d4..570ff08fd42d 100644 --- a/bundler/lib/bundler/man/bundle-outdated.1.ronn +++ b/bundler/lib/bundler/man/bundle-outdated.1.ronn @@ -55,7 +55,7 @@ are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1. Prefer updating only to next minor version. * `--major`: - Prefer updating to next major version (default). + Prefer updating to latest major version (default). * `--patch`: Prefer updating only to next patch version. diff --git a/bundler/lib/bundler/man/bundle-update.1 b/bundler/lib/bundler/man/bundle-update.1 index 1e9081b94af1..ff0ad7670800 100644 --- a/bundler/lib/bundler/man/bundle-update.1 +++ b/bundler/lib/bundler/man/bundle-update.1 @@ -54,7 +54,7 @@ Prefer updating only to next patch version\. Prefer updating only to next minor version\. .TP \fB\-\-major\fR -Prefer updating to next major version (default)\. +Prefer updating to latest major version (default)\. .TP \fB\-\-pre\fR Always choose the highest allowed version, regardless of prerelease status\. @@ -175,7 +175,7 @@ Prefer updating only to next patch version\. Prefer updating only to next minor version\. .TP \fB\-\-major\fR -Prefer updating to next major version (default)\. +Prefer updating to latest major version (default)\. .TP \fB\-\-strict\fR Do not allow any gem to be updated past latest \fB\-\-patch\fR | \fB\-\-minor\fR | \fB\-\-major\fR\. diff --git a/bundler/lib/bundler/man/bundle-update.1.ronn b/bundler/lib/bundler/man/bundle-update.1.ronn index 659ec2da7a06..8d12a2ef0275 100644 --- a/bundler/lib/bundler/man/bundle-update.1.ronn +++ b/bundler/lib/bundler/man/bundle-update.1.ronn @@ -83,7 +83,7 @@ gem. Prefer updating only to next minor version. * `--major`: - Prefer updating to next major version (default). + Prefer updating to latest major version (default). * `--pre`: Always choose the highest allowed version, regardless of prerelease status. @@ -238,7 +238,7 @@ versions are resolved. One of the following options can be used: `--patch`, Prefer updating only to next minor version. * `--major`: - Prefer updating to next major version (default). + Prefer updating to latest major version (default). * `--strict`: Do not allow any gem to be updated past latest `--patch` | `--minor` | `--major`. From 271feac5db34014849ef827efbeba22e6b110049 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 24 Sep 2026 13:48:16 +0900 Subject: [PATCH 04/13] Merge pull request #9904 from matsadler/update-magnus-gem-template Update Magnus version in Rust extension gem template (cherry picked from commit 8e5be16282fab636849d7a115d9ce8f2507cb3a0) --- bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt b/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt index a06166aee7cb..4dd1c1e7fe96 100644 --- a/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +++ b/bundler/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt @@ -12,7 +12,7 @@ publish = false crate-type = ["cdylib"] [dependencies] -magnus = { version = "0.8.2" } +magnus = { version = "0.9" } rb-sys = { version = "0.9", features = ["stable-api-compiled-fallback"] } [build-dependencies] From 21bee08fc4b5c79d9972cb6d39f7c43bffa536d8 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 25 Sep 2026 10:34:11 +0900 Subject: [PATCH 05/13] Merge pull request #9894 from ruby/claude/pr-9700-low-findings-48d509 Remove the build_info file on uninstall and stop gem build from logging unknown extensions (cherry picked from commit 3c87dfa116885d9e557a698d402116d36b47316f) --- lib/rubygems/ext/builder.rb | 9 +++++++-- lib/rubygems/uninstaller.rb | 1 + test/rubygems/test_gem_specification.rb | 19 +++++++++++++++++++ test/rubygems/test_gem_uninstaller.rb | 16 ++++++++++++++++ 4 files changed, 43 insertions(+), 2 deletions(-) diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb index f1fce48823a8..9ece88fb2ba6 100644 --- a/lib/rubygems/ext/builder.rb +++ b/lib/rubygems/ext/builder.rb @@ -204,7 +204,8 @@ def builder_for(extension) # :nodoc: when /Cargo.toml/ then Gem::Ext::CargoBuilder.new else - build_error("No builder for extension '#{extension}'") + # Also called to validate a specification, which must not leave a build log. + raise Gem::Ext::BuildError, "No builder for extension '#{extension}'" end end @@ -229,7 +230,11 @@ def build_error(output, backtrace = nil) # :nodoc: def build_extension(extension, dest_path) # :nodoc: results = [] - builder = builder_for(extension) + begin + builder = builder_for(extension) + rescue Gem::Ext::BuildError => e + build_error(e.message) + end extension_dir = File.expand_path File.join(@gem_dir, File.dirname(extension)) diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb index 28bf33ea7106..555efc91ef07 100644 --- a/lib/rubygems/uninstaller.rb +++ b/lib/rubygems/uninstaller.rb @@ -272,6 +272,7 @@ def remove(spec) safe_delete { rm_r full_gem_path, exclusions: exclusions } safe_delete { FileUtils.rm_r spec.extension_dir } + safe_delete { FileUtils.rm_f spec.build_info_file } old_platform_name = spec.original_name diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index f66b05b5642c..8c33dfcf751a 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -2895,6 +2895,25 @@ def test_validate_rust_extension_have_no_missing_cargo_toml_error end end + def test_validate_extension_without_builder + util_setup_validate + + Dir.chdir @tempdir do + @a1.extensions = ["build.sh"] + File.write File.join(@tempdir, "build.sh"), "" + gem_make_out = File.join @a1.extension_dir, "gem_make.out" + + e = assert_raise Gem::Ext::BuildError do + use_ui @ui do + @a1.validate + end + end + + assert_equal "No builder for extension 'build.sh'", e.message + assert_path_not_exist gem_make_out + end + end + def test_validate_description util_setup_validate diff --git a/test/rubygems/test_gem_uninstaller.rb b/test/rubygems/test_gem_uninstaller.rb index d1aacb40536b..d96f9f433bfe 100644 --- a/test/rubygems/test_gem_uninstaller.rb +++ b/test/rubygems/test_gem_uninstaller.rb @@ -391,6 +391,22 @@ def test_uninstall_extension assert_path_not_exist @spec.extension_dir end + def test_uninstall_removes_build_info_file + installer = setup_base_installer + installer.build_args = %w[--with-foo-dir /opt/foo] + + use_ui ui do + installer.install + end + + assert_path_exist @spec.build_info_file, "sanity check" + + uninstaller = Gem::Uninstaller.new @spec.name, executables: true + uninstaller.uninstall + + assert_path_not_exist @spec.build_info_file + end + def test_uninstall_nonexistent uninstaller = Gem::Uninstaller.new "bogus", executables: true From 72385be59905b9e78f973d8c2718ab969ca7c33a Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 25 Sep 2026 14:34:10 +0900 Subject: [PATCH 06/13] Merge pull request #9909 from ruby/claude/admiring-austin-a87774 Keep credentials on redirects only within the same origin (cherry picked from commit 8e5c0371e619f1a7abc996c661fba0c6b60622dd) --- bundler/lib/bundler/fetcher/downloader.rb | 2 +- .../spec/bundler/fetcher/downloader_spec.rb | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/bundler/lib/bundler/fetcher/downloader.rb b/bundler/lib/bundler/fetcher/downloader.rb index d9cb819d55ef..2deeeb0dcc7d 100644 --- a/bundler/lib/bundler/fetcher/downloader.rb +++ b/bundler/lib/bundler/fetcher/downloader.rb @@ -51,7 +51,7 @@ def fetch(uri, headers = {}, counter = 0) if https?(uri) && !https?(new_uri) raise HTTPError, "Redirecting to a non-https URI is not allowed: #{URICredentialsFilter.credential_filtered_uri(new_uri)}" end - if new_uri.host == uri.host + if [new_uri.scheme, new_uri.host, new_uri.port] == [uri.scheme, uri.host, uri.port] new_uri.user = uri.user new_uri.password = uri.password end diff --git a/bundler/spec/bundler/fetcher/downloader_spec.rb b/bundler/spec/bundler/fetcher/downloader_spec.rb index 8cca6a56a2a7..3d2ec00387bf 100644 --- a/bundler/spec/bundler/fetcher/downloader_spec.rb +++ b/bundler/spec/bundler/fetcher/downloader_spec.rb @@ -58,6 +58,30 @@ end end + context "when the redirect uri is on the same host but another port" do + let(:uri) { Gem::URI("https://username:password@www.uri-to-fetch.com/api/v2/endpoint") } + + before { http_response["location"] = "https://www.uri-to-fetch.com:8443/api/v1/endpoint" } + + it "should not set the user and password for the redirect uri" do + expect(subject).to receive(:fetch).with(uri, options, 0).and_call_original + expect(subject).to receive(:fetch).with(Gem::URI("https://www.uri-to-fetch.com:8443/api/v1/endpoint"), options, 1) + subject.fetch(uri, options, counter) + end + end + + context "when the redirect uri is on the same host but another scheme" do + let(:uri) { Gem::URI("http://username:password@www.uri-to-fetch.com:8080/api/v2/endpoint") } + + before { http_response["location"] = "https://www.uri-to-fetch.com:8080/api/v1/endpoint" } + + it "should not set the user and password for the redirect uri" do + expect(subject).to receive(:fetch).with(uri, options, 0).and_call_original + expect(subject).to receive(:fetch).with(Gem::URI("https://www.uri-to-fetch.com:8080/api/v1/endpoint"), options, 1) + subject.fetch(uri, options, counter) + end + end + context "when the redirect uri downgrades https to http" do let(:uri) { Gem::URI("https://username:password@www.uri-to-fetch.com/api/v2/endpoint") } From 947a7d3152cb6a926c5d64009e603bb2a3040947 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Tue, 29 Sep 2026 20:34:25 +0900 Subject: [PATCH 07/13] Merge pull request #9765 from the-spectator/add-source-option-to-exec-command Add --source option to gem exec command (cherry picked from commit de7381fb570cf2819932303775e81db8b2312884) --- lib/rubygems/commands/exec_command.rb | 3 +++ .../test_gem_commands_exec_command.rb | 22 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/lib/rubygems/commands/exec_command.rb b/lib/rubygems/commands/exec_command.rb index f749df37608e..be56050086c8 100644 --- a/lib/rubygems/commands/exec_command.rb +++ b/lib/rubygems/commands/exec_command.rb @@ -3,17 +3,20 @@ require_relative "../command" require_relative "../dependency_installer" require_relative "../gem_runner" +require_relative "../local_remote_options" require_relative "../package" require_relative "../version_option" class Gem::Commands::ExecCommand < Gem::Command include Gem::VersionOption + include Gem::LocalRemoteOptions def initialize super "exec", "Run a command from a gem", { version: Gem::Requirement.default, } + add_source_option add_version_option add_prerelease_option "to be installed" diff --git a/test/rubygems/test_gem_commands_exec_command.rb b/test/rubygems/test_gem_commands_exec_command.rb index db738b5e9f58..f104a0e85dac 100644 --- a/test/rubygems/test_gem_commands_exec_command.rb +++ b/test/rubygems/test_gem_commands_exec_command.rb @@ -143,6 +143,28 @@ def test_gem_with_executable end end + def test_gem_with_executable_from_custom_source + spec_fetcher "http://other-gems.example.com/" do |fetcher| + fetcher.gem "a", 2 do |s| + s.executables = %w[a] + s.files = %w[bin/a lib/a.rb] + + write_file File.join(*%W[gems #{s.original_name} bin a]) do |f| + f << "Gem.ui.say #{s.original_name.dump}" + end + end + end + + util_clear_gems + + use_ui @ui do + @cmd.invoke "--source", "http://other-gems.example.com", "a:2" + assert_equal "a-2\n", @ui.output + end + + assert_include Gem.sources.to_a, "http://other-gems.example.com/" + end + def test_gem_with_platforms spec_fetcher do |fetcher| fetcher.download "a", 2 do |s| From 9a344a30f806e2ed4c2b28f0a6dd06d697feac4a Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 30 Sep 2026 15:13:47 +0900 Subject: [PATCH 08/13] Merge pull request #9874 from ruby/claude/priceless-montalcini-1dc68b Look up `bundler-` executables only in PATH (cherry picked from commit fa68cfe8cc29e531cabc6333e77ceca322b7130d) --- bundler/lib/bundler/cli.rb | 16 ++++++++++++++-- bundler/spec/bundler/cli_spec.rb | 8 ++++++++ bundler/spec/commands/help_spec.rb | 8 ++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/bundler/lib/bundler/cli.rb b/bundler/lib/bundler/cli.rb index ab5f28474c66..bb0a09e23e59 100644 --- a/bundler/lib/bundler/cli.rb +++ b/bundler/lib/bundler/cli.rb @@ -177,7 +177,7 @@ def help(cli = nil) else puts File.read("#{man_path}/#{File.basename(man_page)}.ronn") end - elsif command_path = Bundler.which("bundler-#{cli}") + elsif command_path = self.class.bundler_command_path(cli) Kernel.exec(command_path, "--help") else super @@ -189,11 +189,23 @@ def self.handle_no_command_error(command, has_namespace = $thor_runner) return Bundler::Plugin.exec_command(command, ARGV[1..-1]) end - return super unless command_path = Bundler.which("bundler-#{command}") + return super unless command_path = bundler_command_path(command) Kernel.exec(command_path, *ARGV[1..-1]) end + # Only PATH is searched, unlike Bundler.which, which also finds a file in + # the current directory and returns a bare name that Kernel.exec cannot run. + def self.bundler_command_path(command) + ENV.fetch("PATH", "").split(File::PATH_SEPARATOR).each do |path| + path = path[1..-2] if path.start_with?('"') && path.end_with?('"') + command_path = Bundler.find_executable(File.expand_path("bundler-#{command}", path)) + return command_path if command_path + end + + nil + end + desc "init [OPTIONS]", "Generates a Gemfile into the current working directory" long_desc <<-D Init generates a default Gemfile in the current working directory. When adding a diff --git a/bundler/spec/bundler/cli_spec.rb b/bundler/spec/bundler/cli_spec.rb index 746330e7ef54..0f1696696b4e 100644 --- a/bundler/spec/bundler/cli_spec.rb +++ b/bundler/spec/bundler/cli_spec.rb @@ -28,6 +28,14 @@ expect(out).to eq("Hello, world") end + it "does not execute a bundler- binary that is only in the current directory" do + create_file(bundled_app("bundler-testtasks"), "#!/usr/bin/env ruby\nputs 'Hello, world'\n") + + bundle "testtasks", raise_on_error: false + + expect(err).to include('Could not find command "testtasks".') + end + describe "aliases" do it "aliases e to exec" do bundle "e --help" diff --git a/bundler/spec/commands/help_spec.rb b/bundler/spec/commands/help_spec.rb index f9ad9fff143e..a47296c292cb 100644 --- a/bundler/spec/commands/help_spec.rb +++ b/bundler/spec/commands/help_spec.rb @@ -43,6 +43,14 @@ expect(out).to eq("--help") end + it "does not execute a bundler- binary that is only in the current directory" do + create_file(bundled_app("bundler-testtasks"), "#!/usr/bin/env ruby\nputs ARGV.join(' ')\n") + + bundle "help testtasks", raise_on_error: false + + expect(err).to include('Could not find command "testtasks".') + end + it "is called when the --help flag is used after the command" do with_fake_man do bundle "install --help" From 69a3986d1d1de1c9d297bbf6ae0b88e932496a46 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 30 Sep 2026 15:30:49 +0900 Subject: [PATCH 09/13] Merge pull request #9898 from IslamElsayed/platform-shows-force-ruby-platform Report the effective platform in `bundle platform` (cherry picked from commit 373e7516f30bb08b9b7f54cec96f2c41759a4c93) --- bundler/lib/bundler/cli/platform.rb | 16 ++++++++++- bundler/spec/commands/platform_spec.rb | 39 ++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/bundler/lib/bundler/cli/platform.rb b/bundler/lib/bundler/cli/platform.rb index 32d68abbb192..e4ee912cd32c 100644 --- a/bundler/lib/bundler/cli/platform.rb +++ b/bundler/lib/bundler/cli/platform.rb @@ -25,7 +25,7 @@ def run else platforms = Bundler.definition.platforms.map {|p| "* #{p}" } - output << "Your platform is: #{Gem::Platform.local}" + output << platform_info output << "Your app has gems that work on these platforms:\n#{platforms.join("\n")}" if ruby_version @@ -44,5 +44,19 @@ def run Bundler.ui.info output.join("\n\n") end + + private + + def platform_info + info = "Your platform is: #{Gem::Platform.local}" + return info if Bundler.local_platform == Gem::Platform.local + + info + "\nHowever, your effective platform is: #{Bundler.local_platform} " \ + "(because force_ruby_platform is #{force_ruby_platform_origin})" + end + + def force_ruby_platform_origin + Bundler.settings.pretty_values_for(:force_ruby_platform).first.sub(/\ASet /, "set ") + end end end diff --git a/bundler/spec/commands/platform_spec.rb b/bundler/spec/commands/platform_spec.rb index 1e233e0917b0..c89cbaa2879a 100644 --- a/bundler/spec/commands/platform_spec.rb +++ b/bundler/spec/commands/platform_spec.rb @@ -25,6 +25,45 @@ G end + it "reports the effective platform when force_ruby_platform is set in the environment" do + gemfile <<-G + source "https://gem.repo1" + + #{ruby_version_correct} + + gem "foo" + G + + bundle "platform", env: { "BUNDLE_FORCE_RUBY_PLATFORM" => "true" } + expect(out).to eq(<<-G.chomp) +Your platform is: #{Gem::Platform.local} +However, your effective platform is: ruby (because force_ruby_platform is set via BUNDLE_FORCE_RUBY_PLATFORM: true) + +Your app has gems that work on these platforms: +* #{Gem::Platform::RUBY} + +Your Gemfile specifies a Ruby version requirement: +* ruby #{Gem.ruby_version} + +Your current platform satisfies the Ruby version requirement. +G + end + + it "points at the config file when force_ruby_platform is set there" do + gemfile <<-G + source "https://gem.repo1" + + #{ruby_version_correct} + + gem "foo" + G + + bundle "config set --local force_ruby_platform true" + bundle "platform" + expect(out).to include("However, your effective platform is: ruby " \ + "(because force_ruby_platform is set for your local app (#{bundled_app(".bundle/config")}): true)") + end + it "returns all the output including the patchlevel" do gemfile <<-G source "https://gem.repo1" From 00dfbb9f2cd1a53f5587da9e93b7c2160a1fc60a Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 30 Sep 2026 15:38:25 +0900 Subject: [PATCH 10/13] Merge pull request #9887 from IslamElsayed/bin-path-no-mkdir Stop `Bundler.bin_path` creating the directory it reports (cherry picked from commit 9ee1d0f2bdd7c0618f1ed918dc38d3910587aa88) --- bundler/lib/bundler.rb | 4 +--- bundler/lib/bundler/installer.rb | 4 ++++ bundler/spec/bundler/bundler_spec.rb | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/bundler/lib/bundler.rb b/bundler/lib/bundler.rb index f8f793f413ca..83dea3f8e201 100644 --- a/bundler/lib/bundler.rb +++ b/bundler/lib/bundler.rb @@ -119,9 +119,7 @@ def configured_bundle_path def bin_path @bin_path ||= begin path = Bundler.settings[:bin] || "bin" - path = Pathname.new(path).expand_path(root).expand_path - mkdir_p(path) - path + Pathname.new(path).expand_path(root).expand_path end end diff --git a/bundler/lib/bundler/installer.rb b/bundler/lib/bundler/installer.rb index c3de428ce90d..22d5b7b0cb58 100644 --- a/bundler/lib/bundler/installer.rb +++ b/bundler/lib/bundler/installer.rb @@ -127,6 +127,8 @@ def generate_bundler_executable_stubs(spec, options = {}) template_path = File.expand_path("templates/Executable", __dir__) template = File.read(template_path) + Bundler.mkdir_p(bin_path) + exists = [] spec.executables.each do |executable| binstub_path = "#{bin_path}/#{executable}" @@ -173,6 +175,8 @@ def generate_standalone_bundler_executable_stubs(spec, options = {}) ruby_command = Thor::Util.ruby_command ruby_command = ruby_command + Bundler.mkdir_p(bin_path) + spec.executables.each do |executable| next if executable == "bundle" executable_path = Pathname(spec.full_gem_path).join(spec.bindir, executable).relative_path_from(bin_path) diff --git a/bundler/spec/bundler/bundler_spec.rb b/bundler/spec/bundler/bundler_spec.rb index 7ce6ca143285..eb226b9a1d42 100644 --- a/bundler/spec/bundler/bundler_spec.rb +++ b/bundler/spec/bundler/bundler_spec.rb @@ -250,6 +250,25 @@ end end + describe "#bin_path" do + it "returns the path without creating the directory" do + allow(Bundler).to receive(:root).and_return(bundled_app) + Bundler.reset_paths! + + expect(Bundler.bin_path).to eq(bundled_app("bin")) + expect(bundled_app("bin")).not_to exist + end + + it "does not touch the filesystem" do + allow(Bundler).to receive(:root).and_return(bundled_app) + Bundler.reset_paths! + + expect(Bundler).not_to receive(:mkdir_p) + + Bundler.bin_path + end + end + describe "#mkdir_p" do it "creates a folder at the given path" do install_gemfile <<-G From ef7d0f7294fd2fad25b2ae6a83779c3406d31ca7 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 30 Sep 2026 16:19:08 +0900 Subject: [PATCH 11/13] Changelog for RubyGems and Bundler version 4.0.22 --- CHANGELOG.md | 13 +++++++++++++ bundler/CHANGELOG.md | 17 +++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61232a9df3b9..2f9d0b05152e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 4.0.22 / 2026-09-30 + +### Enhancements: + +* Add --source option to gem exec command. Pull request [#9765](https://github.com/ruby/rubygems/pull/9765) by Akshay Birajdar and Akshay Birajdar +* Keep credentials on redirects only within the same origin. Pull request [#9909](https://github.com/ruby/rubygems/pull/9909) by Hiroshi SHIBATA +* Validate the version field in Gem::Installer#verify_spec. Pull request [#9890](https://github.com/ruby/rubygems/pull/9890) by Hiroshi SHIBATA +* Installs bundler 4.0.22 as a default gem. + +### Bug fixes: + +* Remove the build_info file on uninstall and stop gem build from logging unknown extensions. Pull request [#9894](https://github.com/ruby/rubygems/pull/9894) by Hiroshi SHIBATA + ## 4.0.21 / 2026-09-16 ### Enhancements: diff --git a/bundler/CHANGELOG.md b/bundler/CHANGELOG.md index 18bfb4de170d..70c94f905d18 100644 --- a/bundler/CHANGELOG.md +++ b/bundler/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## 4.0.22 / 2026-09-30 + +### Enhancements: + +* Report the effective platform in `bundle platform`. Pull request [#9898](https://github.com/ruby/rubygems/pull/9898) by Islam Elsayed +* Keep credentials on redirects only within the same origin. Pull request [#9909](https://github.com/ruby/rubygems/pull/9909) by Hiroshi SHIBATA +* Update Magnus version in Rust extension gem template. Pull request [#9904](https://github.com/ruby/rubygems/pull/9904) by Mat Sadler and Hiroshi SHIBATA + +### Bug fixes: + +* Stop `Bundler.bin_path` creating the directory it reports. Pull request [#9887](https://github.com/ruby/rubygems/pull/9887) by Islam Elsayed and Hiroshi SHIBATA +* Look up `bundler-` executables only in PATH. Pull request [#9874](https://github.com/ruby/rubygems/pull/9874) by Hiroshi SHIBATA + +### Documentation: + +* Describe `--major` as preferring the latest major version. Pull request [#9891](https://github.com/ruby/rubygems/pull/9891) by Hiroshi SHIBATA + ## 4.0.21 / 2026-09-16 ### Enhancements: From 74c57edb0256fb88be39e45a75127709a23b51d2 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 30 Sep 2026 16:19:41 +0900 Subject: [PATCH 12/13] Bump Bundler version to 4.0.22 --- bundler/lib/bundler/version.rb | 2 +- bundler/spec/realworld/fixtures/tapioca/Gemfile.lock | 2 +- bundler/spec/realworld/fixtures/warbler/Gemfile.lock | 2 +- tool/bundler/dev_gems.rb.lock | 2 +- tool/bundler/lint_gems.rb.lock | 2 +- tool/bundler/release_gems.rb.lock | 2 +- tool/bundler/rubocop_gems.rb.lock | 2 +- tool/bundler/standard_gems.rb.lock | 2 +- tool/bundler/test_gems.rb.lock | 2 +- tool/bundler/vendor_gems.rb.lock | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bundler/lib/bundler/version.rb b/bundler/lib/bundler/version.rb index 791b1001322a..ad8bacf3b723 100644 --- a/bundler/lib/bundler/version.rb +++ b/bundler/lib/bundler/version.rb @@ -1,7 +1,7 @@ # frozen_string_literal: false module Bundler - VERSION = "4.0.21".freeze + VERSION = "4.0.22".freeze def self.bundler_major_version @bundler_major_version ||= gem_version.segments.first diff --git a/bundler/spec/realworld/fixtures/tapioca/Gemfile.lock b/bundler/spec/realworld/fixtures/tapioca/Gemfile.lock index a70a2ae93537..c561453c6d78 100644 --- a/bundler/spec/realworld/fixtures/tapioca/Gemfile.lock +++ b/bundler/spec/realworld/fixtures/tapioca/Gemfile.lock @@ -46,4 +46,4 @@ DEPENDENCIES tapioca BUNDLED WITH - 4.0.21 + 4.0.22 diff --git a/bundler/spec/realworld/fixtures/warbler/Gemfile.lock b/bundler/spec/realworld/fixtures/warbler/Gemfile.lock index 3f304aa8563a..e873e61c0c8e 100644 --- a/bundler/spec/realworld/fixtures/warbler/Gemfile.lock +++ b/bundler/spec/realworld/fixtures/warbler/Gemfile.lock @@ -36,4 +36,4 @@ DEPENDENCIES warbler! BUNDLED WITH - 4.0.21 + 4.0.22 diff --git a/tool/bundler/dev_gems.rb.lock b/tool/bundler/dev_gems.rb.lock index b477846eadde..e17ea88e66da 100644 --- a/tool/bundler/dev_gems.rb.lock +++ b/tool/bundler/dev_gems.rb.lock @@ -129,4 +129,4 @@ CHECKSUMS turbo_tests (2.2.5) sha256=3fa31497d12976d11ccc298add29107b92bda94a90d8a0a5783f06f05102509f BUNDLED WITH - 4.0.21 + 4.0.22 diff --git a/tool/bundler/lint_gems.rb.lock b/tool/bundler/lint_gems.rb.lock index 5696326acc02..73fcd74aa197 100644 --- a/tool/bundler/lint_gems.rb.lock +++ b/tool/bundler/lint_gems.rb.lock @@ -119,4 +119,4 @@ CHECKSUMS wmi-lite (1.0.7) sha256=116ef5bb470dbe60f58c2db9047af3064c16245d6562c646bc0d90877e27ddda BUNDLED WITH - 4.0.21 + 4.0.22 diff --git a/tool/bundler/release_gems.rb.lock b/tool/bundler/release_gems.rb.lock index 2cdf2cd2658d..1a07201c7cc0 100644 --- a/tool/bundler/release_gems.rb.lock +++ b/tool/bundler/release_gems.rb.lock @@ -87,4 +87,4 @@ CHECKSUMS uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6 BUNDLED WITH - 4.0.21 + 4.0.22 diff --git a/tool/bundler/rubocop_gems.rb.lock b/tool/bundler/rubocop_gems.rb.lock index 46035a284a7d..ffd94f98676a 100644 --- a/tool/bundler/rubocop_gems.rb.lock +++ b/tool/bundler/rubocop_gems.rb.lock @@ -156,4 +156,4 @@ CHECKSUMS unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f BUNDLED WITH - 4.0.21 + 4.0.22 diff --git a/tool/bundler/standard_gems.rb.lock b/tool/bundler/standard_gems.rb.lock index 44c6fecdbf82..49dbdf6bddaa 100644 --- a/tool/bundler/standard_gems.rb.lock +++ b/tool/bundler/standard_gems.rb.lock @@ -176,4 +176,4 @@ CHECKSUMS unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f BUNDLED WITH - 4.0.21 + 4.0.22 diff --git a/tool/bundler/test_gems.rb.lock b/tool/bundler/test_gems.rb.lock index f6a6e227c715..a4a696e801ca 100644 --- a/tool/bundler/test_gems.rb.lock +++ b/tool/bundler/test_gems.rb.lock @@ -102,4 +102,4 @@ CHECKSUMS tilt (2.6.1) sha256=35a99bba2adf7c1e362f5b48f9b581cce4edfba98117e34696dde6d308d84770 BUNDLED WITH - 4.0.21 + 4.0.22 diff --git a/tool/bundler/vendor_gems.rb.lock b/tool/bundler/vendor_gems.rb.lock index 371f5404d7b3..c6f63b246cf7 100644 --- a/tool/bundler/vendor_gems.rb.lock +++ b/tool/bundler/vendor_gems.rb.lock @@ -69,4 +69,4 @@ CHECKSUMS uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6 BUNDLED WITH - 4.0.21 + 4.0.22 From 1a8d4c35e3efc4b5f60c5c0aca0d0eac263baa47 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 30 Sep 2026 16:19:41 +0900 Subject: [PATCH 13/13] Bump Rubygems version to 4.0.22 --- lib/rubygems.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubygems.rb b/lib/rubygems.rb index e6db0d71d05e..ac03f9e5c1ba 100644 --- a/lib/rubygems.rb +++ b/lib/rubygems.rb @@ -9,7 +9,7 @@ require "rbconfig" module Gem - VERSION = "4.0.21" + VERSION = "4.0.22" end require_relative "rubygems/defaults"