Skip to content

Commit

Permalink
Fix possible malicious website to example.com
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fiveNinePlusR authored and deivid-rodriguez committed Sep 21, 2021
1 parent 8721fe2 commit 26622c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bundler/lib/bundler/templates/newgem/newgem.gemspec.tt
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 1 addition & 1 deletion bundler/spec/commands/newgem_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 26622c8

Please sign in to comment.