Clear current_user if we reject OAuth 1
This ensures we don't try and do any further validation of the user which might lead to trying to report additional errors.
This commit is contained in:
parent
d4344da2be
commit
3e77cae66c
1 changed files with 1 additions and 0 deletions
|
@ -112,6 +112,7 @@ class ApiController < ApplicationController
|
|||
# self.current_user setup by OAuth
|
||||
else
|
||||
report_error t("application.oauth_10a_disabled", :link => t("application.auth_disabled_link")), :forbidden
|
||||
self.current_user = nil
|
||||
end
|
||||
else
|
||||
username, passwd = auth_data # parse from headers
|
||||
|
|
Loading…
Add table
Reference in a new issue