myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2676] trunk/app/controllers/oauth_controller.rb:


From: noreply
Subject: [myexperiment-hackers] [2676] trunk/app/controllers/oauth_controller.rb: Guard against there not being an application associated with a token.
Date: Wed, 17 Aug 2011 12:28:39 -0400 (EDT)

Revision
2676
Author
dtm
Date
2011-08-17 12:28:38 -0400 (Wed, 17 Aug 2011)

Log Message

Guard against there not being an application associated with a token.

Modified Paths

Diff

Modified: trunk/app/controllers/oauth_controller.rb (2675 => 2676)


--- trunk/app/controllers/oauth_controller.rb	2011-08-15 13:35:51 UTC (rev 2675)
+++ trunk/app/controllers/oauth_controller.rb	2011-08-17 16:28:38 UTC (rev 2676)
@@ -32,6 +32,13 @@
   def authorize
     @client_applications=current_user.client_applications
     @token=RequestToken.find_by_token params[:oauth_token]
+    if @token.client_application.nil?
+       if redirect_url
+         redirect_to redirect_url+"?oauth_failure=1"
+       else
+         render :action=""
+       end
+    end
     @address@hidden
     redirect_url=params[:oauth_callback]||@token.client_application.callback_url
     if (@token.client_application.key_type == 'System') || @client_applications.include?(@token.client_application)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]