Skip to content

Commit

Permalink
[webui] avoid exceptions from invalid users while rendering the error
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Nov 6, 2012
1 parent 4e9928a commit b022f67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/webui/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ def rescue_with_handler( exception )
end
end
when ActiveXML::Transport::UnauthorizedError
# do not try to access user
@user = nil
session[:login] = nil
#ExceptionNotifier.deliver_exception_notification(exception, self, strip_sensitive_data_from(request), {}) if send_exception_mail?
render_error :status => 401, :message => 'Unauthorized access, please login'
when ActionController::InvalidAuthenticityToken
Expand Down

0 comments on commit b022f67

Please sign in to comment.