]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/request_token.rb
Merge remote-tracking branch 'upstream/pull/4973'
[rails.git] / app / models / request_token.rb
index f7c9501b56b3c84ce938a98b4966c4c3d8ac11d3..ec38f7421f47f70101b5bebc44a30279d11258f6 100644 (file)
@@ -42,7 +42,7 @@ class RequestToken < OauthToken
     return false if authorized?
 
     self.user = user
-    self.authorized_at = Time.now
+    self.authorized_at = Time.now.utc
     self.verifier = OAuth::Helper.generate_key(20)[0, 20] unless oauth10?
     save
   end
@@ -73,7 +73,7 @@ class RequestToken < OauthToken
   end
 
   def oob?
-    callback_url.nil? || callback_url.casecmp("oob").zero?
+    callback_url.nil? || callback_url.casecmp?("oob")
   end
 
   def oauth10?