1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-09 11:46:49 +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:
catborise 2026-11-05 17:29:51 +03:00
parent d3178154c3
commit 2cbcb8ab2c
6 changed files with 44 additions and 0 deletions

View file

@ -3,6 +3,7 @@ from computes.models import Compute
from django.contrib import messages
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404, render
from django.views.decorators.debug import sensitive_post_parameters
from instances.models import Instance
from libvirt import libvirtError
from logs.audit import audit
@ -11,6 +12,7 @@ from vrtManager.virtsecrets import wvmSecrets
from virtsecrets.forms import USAGE_TEXTS, AddSecret
@sensitive_post_parameters()
@superuser_only
def secrets(request, compute_id):
"""The host's secrets with the VMs and pools that use them; one created,