Fixed bug when oauthorizing with a token which no longer exists.

This commit is contained in:
Matt Amos 2009-09-01 10:10:49 +00:00
parent 26a9f98dc1
commit 7499fbc6e4

View 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|