From: Tom Hughes Date: Thu, 22 Apr 2021 17:53:27 +0000 (+0100) Subject: Monkey patch oauth gem to avoid use of deprecated URI.escape X-Git-Tag: live~1648 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/ad6c0d3ebabdfe985ce91b10e3ae07b68ebd768f Monkey patch oauth gem to avoid use of deprecated URI.escape --- diff --git a/config/initializers/oauth.rb b/config/initializers/oauth.rb index 2e2f45ab8..bad01dd3d 100644 --- a/config/initializers/oauth.rb +++ b/config/initializers/oauth.rb @@ -4,6 +4,14 @@ require "oauth/rack/oauth_filter" Rails.configuration.middleware.use OAuth::Rack::OAuthFilter module OAuth + module Helper + def escape(value) + value.to_s.gsub(OAuth::RESERVED_CHARACTERS) do |c| + format("%%%02X", c.ord) + end + end + end + module RequestProxy class RackRequest def method