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:
Tom Hughes 2024-07-07 19:40:28 +01:00
parent d4344da2be
commit 3e77cae66c

View file

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