X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ca5de5b4e01297b07ce3a9db45e908f15f7cda11..c1cdddf11f363d24f7c18b3e9df15e1bde3c4302:/app/controllers/oauth_controller.rb diff --git a/app/controllers/oauth_controller.rb b/app/controllers/oauth_controller.rb index 59ebfd631..4bb129ba4 100644 --- a/app/controllers/oauth_controller.rb +++ b/app/controllers/oauth_controller.rb @@ -27,7 +27,7 @@ class OauthController < ApplicationController end def revoke - @token = current_user.oauth_tokens.find_by_token params[:token] + @token = current_user.oauth_tokens.find_by :token => params[:token] if @token @token.invalidate! flash[:notice] = t("oauth.revoke.flash", :application => @token.client_application.name) @@ -49,7 +49,7 @@ class OauthController < ApplicationController else @token.oob? ? @token.client_application.callback_url : @token.callback_url end - @redirect_url = URI.parse(callback_url) unless callback_url.blank? + @redirect_url = URI.parse(callback_url) if callback_url.present? if @redirect_url.to_s.blank? render :action => "authorize_success"