audit: add cleanse_dict function to ensure no passwords end in logs

This commit is contained in:
Jens Langhammer
2020-06-29 19:13:07 +02:00
parent 21ba969072
commit 96a6ac85df
3 changed files with 21 additions and 4 deletions

View File

@ -15,7 +15,7 @@ from django.views.decorators.clickjacking import xframe_options_sameorigin
from django.views.generic import TemplateView, View
from structlog import get_logger
from passbook.audit.models import sanitize_dict
from passbook.audit.models import cleanse_dict
from passbook.core.views.utils import PermissionDeniedView
from passbook.flows.exceptions import EmptyFlowException, FlowNonApplicableException
from passbook.flows.models import Flow, FlowDesignation, Stage
@ -162,7 +162,7 @@ class FlowExecutorView(View):
LOGGER.debug(
"f(exec): User passed all stages",
flow_slug=self.flow.slug,
context=sanitize_dict(self.plan.context),
context=cleanse_dict(self.plan.context),
)
return self._flow_done()