From 26622c81c2e8603f055ead5f6c765064fe428fd8 Mon Sep 17 00:00:00 2001 From: fiveNinePlusR Date: Fri, 17 Sep 2021 09:41:05 -0700 Subject: [PATCH] Fix possible malicious website to example.com example.com is the canonical stand in for domain examples and will never have a backing website. via https://www.rfc-editor.org/rfc/rfc2606.html --- bundler/lib/bundler/templates/newgem/newgem.gemspec.tt | 2 +- bundler/spec/commands/newgem_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt b/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt index c46e2c348059..e07ec5867d7b 100644 --- a/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt +++ b/bundler/lib/bundler/templates/newgem/newgem.gemspec.tt @@ -16,7 +16,7 @@ Gem::Specification.new do |spec| <%- end -%> spec.required_ruby_version = ">= <%= config[:required_ruby_version] %>" - spec.metadata["allowed_push_host"] = "TODO: Set to 'https://mygemserver.com'" + spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'" spec.metadata["homepage_uri"] = spec.homepage spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here." diff --git a/bundler/spec/commands/newgem_spec.rb b/bundler/spec/commands/newgem_spec.rb index 4ccf9be6a88d..0a4e683a0401 100644 --- a/bundler/spec/commands/newgem_spec.rb +++ b/bundler/spec/commands/newgem_spec.rb @@ -563,7 +563,7 @@ def create_temporary_dir(dir) bundle "gem #{gem_name}" expect(generated_gemspec.metadata["allowed_push_host"]). - to match(/mygemserver\.com/) + to match(/example\.com/) end it "sets a minimum ruby version" do