Use a valuetype the settings column actually documents
printedparts_kiosk_token declared valuetype 'secret'. The column documents string, boolean, integer and json, and that was the only 'secret' in the codebase - it worked only because Setting.get falls through to the raw string when it recognises nothing. Masking never depended on it: settings.py::_is_secret keys on the NAME containing 'token', so the value is still hidden in API reads and in the audit log. Changed to string, which is what it is. Scope: product
This commit is contained in:
@@ -162,7 +162,11 @@ class PrintedpartsPlugin(BasePlugin):
|
|||||||
{
|
{
|
||||||
'key': 'printedparts_kiosk_token',
|
'key': 'printedparts_kiosk_token',
|
||||||
'value': '',
|
'value': '',
|
||||||
'valuetype': 'secret',
|
# string, not 'secret': the column documents string/boolean/
|
||||||
|
# integer/json only. Masking is keyed on the NAME containing
|
||||||
|
# 'token' (settings.py::_is_secret), so this is still hidden in
|
||||||
|
# the API and the audit log.
|
||||||
|
'valuetype': 'string',
|
||||||
'category': 'printedparts',
|
'category': 'printedparts',
|
||||||
'description': 'Device token the kiosk sends as X-Kiosk-Token. '
|
'description': 'Device token the kiosk sends as X-Kiosk-Token. '
|
||||||
'Generate one, then open the kiosk once as '
|
'Generate one, then open the kiosk once as '
|
||||||
|
|||||||
Reference in New Issue
Block a user