Closed ykitamura-mdsol closed 4 years ago
The main change is in 30eb931.
When using mauth-client with ruby 2.7, you will see this warning:
/home/travis/build/mdsol/mauth-client-ruby/lib/mauth/client/security_token_cacher.rb:27: warning: URI.escape is obsolete
https://travis-ci.org/github/mdsol/mauth-client-ruby/jobs/725788004#L322-L350
URI.escape is used only in SecurityTokenCacher to encode app_uuid when retrieving public keys from mauth:
URI.escape
url_encoded_app_uuid = URI.escape(app_uuid, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))
this is encoding characters not in URI::PATTERN::UNRESERVED:
URI::PATTERN::UNRESERVED
URI::PATTERN::UNRESERVED #=> "\\-_.!~*'()a-zA-Z\\d"
CGI.escape is encoding a little more characters but it should not affect to the characters used for app_uuids:
CGI.escape
def CGI::escape(string) string.gsub(/([^ a-zA-Z0-9_.-]+)/) do '%' + $1.unpack('H2' * $1.bytesize).join('%').upcase end.tr(' ', '+') end
@mdsol/team-16 @mdsol/architecture-enablement @jcarres-mdsol
The main change is in 30eb931.
Background
When using mauth-client with ruby 2.7, you will see this warning:
https://travis-ci.org/github/mdsol/mauth-client-ruby/jobs/725788004#L322-L350
URI.escape
is used only in SecurityTokenCacher to encode app_uuid when retrieving public keys from mauth:this is encoding characters not in
URI::PATTERN::UNRESERVED
:CGI.escape
is encoding a little more characters but it should not affect to the characters used for app_uuids:@mdsol/team-16 @mdsol/architecture-enablement @jcarres-mdsol