]> git.openstreetmap.org Git - rails.git/commitdiff
Fixed bug when oauthorizing with a token which no longer exists (merged 17416 from...
authorMatt Amos <zerebubuth@gmail.com>
Tue, 1 Sep 2009 10:25:53 +0000 (10:25 +0000)
committerMatt Amos <zerebubuth@gmail.com>
Tue, 1 Sep 2009 10:25:53 +0000 (10:25 +0000)
app/controllers/oauth_controller.rb

index 98075b8f810d40bf9cdd6faf8012095e4d0aed3f..4b539b1fdc879207eca038bdfe59e31be2b429ff 100644 (file)
@@ -38,7 +38,7 @@ class OauthController < ApplicationController
 
   def oauthorize
     @token = RequestToken.find_by_token params[:oauth_token]
-    unless @token.invalidated?
+    unless @token.nil? or @token.invalidated? 
       if request.post?
         any_auth = false
         @token.client_application.permissions.each do |pref|