lyokato/p5-oauth-lite — pull request #5 by ninjinkun (2013-12-11 03:24:10+00:00)
Title: Query values sort method is RFC5849 invalid

# Problem
- Signature invalid caused when there are two or more same key and they contain ASCII and non ASCII value.
- e.g. `?tag=ブックマーク&tag=perl`
- `OAuth::Lite`'s values sort method is RFC5849 invalid.
- RFC5849 said sort with encoded value. http://tools.ietf.org/html/rfc5849#section-3.4.1.3.2
- e.g. `tag=%E3%83%96%E3%83%83%E3%82%AF%E3%83%9E%E3%83%BC%E3%82%AF&tag=perl`
- `OAuth::Lite` implemented that sort with raw value.
- e.g. `tag=perl&tag=%E3%83%96%E3%83%83%E3%82%AF%E3%83%9E%E3%83%BC%E3%82%AF`

# Solution
- Sort with encoded values complied with RFC5849.

# Note
- This patch is incompatible with current version 1.31.
- But impact is small I think because there are less situation where use same key and they contain ASCII and non ASCII.
- OAuth1.0a is not mentioned this problem.
- http://oauth.net/core/1.0a/
- `oauth-ruby` has same problem. https://github.com/oauth-xx/oauth-ruby/blob/master/lib/oauth/helper.rb#L36
- I forked from https://github.com/yayohei/p5-oauth-lite and made pull request under his allowance.