Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sunstone - Sinatra shows exceptions by default #3751

Closed
7 tasks
xBytez opened this issue Sep 20, 2019 · 2 comments
Closed
7 tasks

Sunstone - Sinatra shows exceptions by default #3751

xBytez opened this issue Sep 20, 2019 · 2 comments

Comments

@xBytez
Copy link
Contributor

xBytez commented Sep 20, 2019

Description
When triggering an error in the sunstone-server, the user is given a full stack trace with a lot of debug info. This should be disabled by default to prevent information disclosure.

To Reproduce

Expected behavior
I expected Sinatra to return

<h1>Internal Server Error</h1>

Details

  • Affected Component: Sunstone
  • Hypervisor: vCenter (not related)
  • Version: 5.8.1 (and latest from master)

Additional context
Add any other context about the problem here.

You can fix this by setting the environment for sunstone-server to production by default. You can do so by:

  • Setting set :environment, :production in sunstone-server.rb (preferred, APP_ENV overrides this)
  • Setting an environment variable "APP_ENV" to production in the service file

Progress Status

  • Branch created
  • Code committed to development branch
  • Testing - QA
  • Documentation
  • Release notes - resolved issues, compatibility, known issues
  • Code committed to upstream release/hotfix branches
  • Documentation committed to upstream release/hotfix branches
@vholer
Copy link
Contributor

vholer commented Oct 8, 2019

I guess this settings should be based on :env in the sunstone-server.conf. If it's set to prod (by default), it should set the production environment in Sinatra as well. Right now it only takes different CSS/JS files.

jloboescalona2 pushed a commit to jloboescalona2/one that referenced this issue Dec 3, 2019
Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
tinova pushed a commit that referenced this issue Dec 3, 2019
Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
jloboescalona2 pushed a commit to jloboescalona2/docs that referenced this issue Dec 3, 2019
Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
tinova pushed a commit that referenced this issue Dec 3, 2019
Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
(cherry picked from commit f141633)
tinova pushed a commit to OpenNebula/docs that referenced this issue Dec 3, 2019
Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
@jloboescalona2
Copy link
Contributor

@tinova PR to approve:
-ONE: #4015
-Docs: OpenNebula/docs#856

@tinova tinova closed this as completed Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants