Opened 13 years ago

Closed 11 years ago

#16435 closed New feature (wontfix)

Configurable hidden settings in debug mode

Reported by: munderwood@… Owned by: nobody
Component: Core (Other) Version: 1.3
Severity: Normal Keywords: settings.py
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi all,

I've ran into the case where I have a settings variable in settings.py that I would like to have displayed starred out or hidden when in debug mode, like the databases PASSWORD variable. It appears that if its name contains SECRET, PASSWORD, PROFANITIES_LIST or SIGNATURE then the debug view will hide it, but anything else it wont.

It would be nice from a user point of view to be able to add to this list of hidden keywords to hide specific things that dont fall under these four keywords.

Cheers

Mark

Change History (4)

comment:1 by Julien Phalip, 13 years ago

Triage Stage: UnreviewedDesign decision needed

This is currently controlled by the HIDDEN_SETTINGS variable in source:django/trunk/django/views/debug.py#L18 as described in https://docs.djangoproject.com/en/dev/ref/settings/#debug and introduced in [1242].

However, there is no easy way for the developer to override this value. Perhaps a new global settings should be added.

comment:2 by anonymous, 13 years ago

I think something along those lines would be appropriate

comment:3 by Jacob, 13 years ago

Triage Stage: Design decision neededAccepted

I'm fairly sure this is a duplicate of another ticket involving more granular controls of what's hidden and not, but I can't find it now. Marking accepted, but potential patch writers beware: I will not accept a patch that solves this simply by introducing Yet Another Setting. Let's find a more elegant approach, please.

comment:4 by Jochem, 11 years ago

Resolution: wontfix
Status: newclosed

I can't really think of a nice solution that doesn't involve Yet Another Setting™. In my opinion, if you want to keep the values for certain variables secret, just prefix their names with 'SECRET_'.

Note: See TracTickets for help on using tickets.
Back to Top