[#75225] [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7) — k@...
Issue #12324 has been reported by Kazuki Yamaguchi.
6 messages
2016/04/27
[#78693] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
k@rhe.jp wrote:
[#78701] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Kazuki Yamaguchi <k@...>
2016/12/17
On Sat, Dec 17, 2016 at 01:31:12AM +0000, Eric Wong wrote:
[#78702] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
Kazuki Yamaguchi <k@rhe.jp> wrote:
[ruby-core:74801] [Ruby trunk Bug#12235] URI.encode issue with square brackets
From:
naruse@...
Date:
2016-04-04 09:19:16 UTC
List:
ruby-core #74801
Issue #12235 has been updated by Yui NARUSE.
escalating URL spec: https://github.com/whatwg/url/issues/112
----------------------------------------
Bug #12235: URI.encode issue with square brackets
https://bugs.ruby-lang.org/issues/12235#change-57924
* Author: Luca Spiller
* Status: Open
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
URI::Encode doesn't correctly handle square brackets in the path of a URL:
> URI.encode('http://example.com/resource[1].doc')
=> "http://example.com/resource[1].doc"
It should return "http://example.com/resource%5B1%5D.doc".
As per [RFC3986](http://tools.ietf.org/html/rfc3986#appendix-D.1), square brackets are only valid in the host part, not the path part.
URI.parse correctly raises an error if a URL has square brackets in the path, which means URI::encode can return something that is rejected by URI.parse:
> URi.parse('http://example.com/resource[1].doc')
URI::InvalidURIError: bad URI(is not URI?): http://example.com/resource[1].doc
> URI.parse(URI::encode('http://example.com/resource[1].doc'))
URI::InvalidURIError: bad URI(is not URI?): http://example.com/resource[1].doc
Tested on Ruby 2.1.5 and 2.3.0 on OS X and Linux.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>