Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Use RFC 2396 compatible URI parser for trustroot. #85

Merged
merged 2 commits into from
Mar 5, 2015
Merged

Use RFC 2396 compatible URI parser for trustroot. #85

merged 2 commits into from
Mar 5, 2015

Conversation

tobiashm
Copy link
Contributor

@tobiashm tobiashm commented Jan 9, 2015

From Ruby 2.2 the default URI.parse method uses a new RFC 3986
compatible parser, which will parse most of the “invalid” URLs in the
trustroot test.

The URI::DEFAULT_PARSER references the “old” RFC 2396 compatible
URI parser in every version of Ruby I've tested.

Test script:

$ rvm 1.9.3,2.0.0,2.1,2.2,jruby,jruby-head,rbx do ruby -ruri -e "print %(#{RUBY_VERSION} : ); \
begin \
  URI::DEFAULT_PARSER.parse('http://*.schtuff.*/'); \
  p 'parsed'; \
rescue URI::InvalidURIError; \
  p 'invalid'; \
end"

Output:

1.9.3 : "invalid"
2.0.0 : "invalid"
2.1.5 : "invalid"
2.2.0 : "invalid"
1.9.3 : "invalid"
2.2.0 : "invalid"
2.1.0 : "invalid"

The same, using URI.parse instead, outputs:

1.9.3 : "invalid"
2.0.0 : "invalid"
2.1.5 : "invalid"
2.2.0 : "parsed"
1.9.3 : "invalid"
2.2.0 : "parsed"
2.1.0 : "invalid"

From Ruby 2.2 the default `URI.parse` method uses a new RFC 3986
compatible parser, which will parse most of the “invalid” URLs in the
trustroot test.
@jesperronn
Copy link

Travis failure caused by JRuby 1.7.18. Travis will now use JRuby 1.7.19, where the internal JRuby failure is fixed.

@dennisreimann could you please trigger Travis to restart the build?

dennisreimann added a commit that referenced this pull request Mar 5, 2015
Use RFC 2396 compatible URI parser for trustroot.
@dennisreimann dennisreimann merged commit 56a5290 into openid:master Mar 5, 2015
jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Mar 14, 2015
Sort PLIST.

## 2.7.0

* Use RFC 2396 compatible URI parser for trustroot - 7c84ec9ced3ccbdad575e02dbfa81e53b52f909e
  See openid/ruby-openid#85
* Use HMAC from OpenSSL rather than Digest - ce2e30d7ff3308f17ef7d8c19d6f4752f76c9c40
  See openid/ruby-openid#84
* Check if OpenSSL is loaded - 751e55820d958ee781f5abb466a576d83ddde6fd

## 2.6.0

* More safely build filenames - 1c4a90630b183e7572b8ab5f2e3a3e0c0fecd2c7
  See openid/ruby-openid#80
* The session serializer of Rails4.1 is json - b44a1eb511dec3be25a07930121bc80cacec0f1c
* Handle boolean value to fix signature issue - d65076269b77754da7db6e4b189edeeb9201600d
  See openid/ruby-openid#76
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants