Project

General

Profile

Actions

Bug #18338

closed

Missing common error templates (incl. missing permission)

Added by Lukas Zapletal almost 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Roles and Permissions
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hello,

in the main application controller we redirect to common/4xx views but these are not present causing the Rails app to crash with generic 500:

[lzap@lzapx katello]$ ag common/40
app/controllers/katello/application_controller.rb
299:        format.html { render :template => "katello/common/403", :layout => !request.xhr?, :status => 403 }
313:        format.html { render :template => "katello/common/404", :layout => !request.xhr?, :status => 404 }
360:          render :template => 'katello/common/400', :layout => !request.xhr?, :status => status,

I experienced this with Satellite 6.2, if this is an easy fix, please file backport BZ, thanks.

2017-02-01 06:17:22 [app] [I] Started GET "/katello/403" for 10.40.204.143 at 2017-02-01 06:17:22 -0500
2017-02-01 06:17:22 [app] [I] Processing by Katello::ApplicationController#permission_denied as HTML
2017-02-01 06:17:22 [app] [I] Completed 500 Internal Server Error in 128ms
2017-02-01 06:17:22 [app] [F] 
 | ActionView::MissingTemplate (Missing template katello/common/403 with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :rabl]}. Searched in:
 |   * "/usr/share/foreman/app/views" 
 |   * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-0.3.0.13/app/views" 
 |   * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.5.3.18/app/views" 
 |   * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_discovery-5.0.0.9/app/views" 
 |   * "/opt/theforeman/tfm/root/usr/share/gems/gems/redhat_access-1.0.13/app/views" 
 |   * "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.95/app/views" 
 |   * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-0.7.14.11/app/views" 
 |   * "/opt/theforeman/tfm/root/usr/share/gems/gems/bastion-3.2.0.10/app/views" 
 |   * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk-6.1.0.3/app/views" 
 |   * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-2.0.1.11/app/views" 
 |   * "/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_theme_satellite-0.1.38/app/views" 
 |   * "/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.3.6/app/views" 
 | ):
 |   katello (3.0.0.95) app/controllers/katello/application_controller.rb:290:in `block (2 levels) in render_403'
 |   katello (3.0.0.95) app/controllers/katello/application_controller.rb:289:in `render_403'
 |   app/controllers/application_controller.rb:61:in `deny_access'
 |   app/controllers/application_controller.rb:53:in `authorize'
 |   lib/middleware/catch_json_parse_errors.rb:9:in `call'
 | 

Related issues 1 (0 open1 closed)

Related to Foreman - Feature #12754: Print the required permission on 403 pageClosedMarek Hulán12/09/2015Actions
Actions

Also available in: Atom PDF