X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a1cb0f04d476101116087286ff072d3a137355cb..316ebb7570d1e894d6889481ec3a56276cb3e88b:/app/models/request_token.rb diff --git a/app/models/request_token.rb b/app/models/request_token.rb index 0044dde26..1ac502bc7 100644 --- a/app/models/request_token.rb +++ b/app/models/request_token.rb @@ -6,7 +6,7 @@ class RequestToken < OauthToken return false if authorized? self.user = user self.authorized_at = Time.now - self.verifier = OAuth::Helper.generate_key(16)[0,20] unless oauth10? + self.verifier = OAuth::Helper.generate_key(20)[0,20] unless oauth10? self.save end @@ -36,7 +36,7 @@ class RequestToken < OauthToken end def oob? - self.callback_url=='oob' + callback_url.nil? || callback_url.downcase == 'oob' end def oauth10?