Projects

Ticket #462 (closed defect: fixed)

Opened 2 years ago

Last modified 20 months ago

Net::HTTP Gives "Insecure Operation" When Using HTTPS

Reported by: cwdinfo@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby 0.7
Component: MacRuby Keywords:
Cc:

Description

Here's the code and the results:

irb(main):002:0> require 'net/https';require 'uri'
=> false
irb(main):003:0> url = URI.parse('https://myverysecuresite.com')
=> #<URI::HTTPS:0x200298e40 URL:https://myverysecuresite.com>
irb(main):004:0> req = Net::HTTP::Get.new(url.path)
core:in `push:': Insecure operation: -r (SecurityError)
	from core:in `gets'

Change History

Changed 20 months ago by martinlagardette@…

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to MacRuby 0.7

This seems to be fixed in 0.7:

$> macirb
irb(main):001:0> require 'net/https';require 'uri'
=> false
irb(main):002:0> url = URI.parse('https://myverysecuresite.com')
=> #<URI::HTTPS:0x20028fc00 URL:https://myverysecuresite.com>
irb(main):003:0> req = Net::HTTP::Get.new(url.path)
ArgumentError: HTTP request path is empty

Compared to ruby19:

$> irb19
irb(main):001:0> require 'net/https';require 'uri'
=> false
irb(main):002:0> url = URI.parse('https://myverysecuresite.com')
=> #<URI::HTTPS:0x00000102815030 URL:https://myverysecuresite.com>
irb(main):003:0> req = Net::HTTP::Get.new(url.path)
ArgumentError: HTTP request path is empty
	from /usr/local/lib/ruby/1.9.1/net/http.rb:1672:in `initialize'
	from /usr/local/lib/ruby/1.9.1/net/http.rb:1791:in `initialize'
	from (irb):3:in `new'
	from (irb):3
	from /usr/local/bin/irb19:12:in `<main>'
Note: See TracTickets for help on using tickets.