Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent sensitive information from being logged (#65)
* Rearrange logging to prevent logging secrets This change logs the body of the request after the view has run in order to allow django to mark sensitive post parameters and cause them to be replaced with astericts in the logs. See https://docs.djangoproject.com/en/2.2/howto/error-reporting/#django.views.decorators.debug.sensitive_post_parameters for more info * use chunked_to_max and cleanup a long line * Fix failing unit tests * simplify the logic and add a unit test to validate that the sensitive parameters are not logged * Make changes based on feedback
- Loading branch information
Showing
2 changed files
with
54 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters