mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 04:06:47 +00:00
fix: the views that take a password or a key keep it out of error reports
No view used sensitive_post_parameters, so once ADMINS is set the error mail of a failing POST would carry the password or key in plain text. The user create, edit and password views, the password change, the compute forms, the host secrets, the VM's root password and its console settings now mark their POST data sensitive.
This commit is contained in:
parent
d3178154c3
commit
2cbcb8ab2c
6 changed files with 44 additions and 0 deletions
|
|
@ -38,6 +38,7 @@ from django.utils import timezone
|
|||
from django.utils.translation import gettext as _
|
||||
from django.utils.translation import gettext_lazy, gettext_noop
|
||||
from django.views.decorators.http import require_POST
|
||||
from django.views.decorators.debug import sensitive_post_parameters
|
||||
from libvirt import (VIR_DOMAIN_PAUSED,
|
||||
VIR_DOMAIN_RUNNING,
|
||||
VIR_DOMAIN_SHUTOFF,
|
||||
|
|
@ -1091,6 +1092,7 @@ def access_error(request, err):
|
|||
return text
|
||||
|
||||
|
||||
@sensitive_post_parameters()
|
||||
@require_POST
|
||||
@serialize_instance_mutation
|
||||
def set_root_pass(request, pk):
|
||||
|
|
@ -2320,6 +2322,7 @@ def clone(request, pk):
|
|||
return redirect(reverse("instances:instance", args=[pk]))
|
||||
|
||||
|
||||
@sensitive_post_parameters()
|
||||
@require_POST
|
||||
@serialize_instance_mutation
|
||||
def update_console(request, pk):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue