Fix mask_dict_password for non string/dict type key in dict

Bug #1600168 reported by dharmendra on 2016-07-08
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
oslo.utils
Undecided
dharmendra

Bug Description

mask_dict_password method remove the keys from passed dict if those
are not of
- indicative of password
- Dict
- String type

So key with value None of other type than string/dict are being removed.

This method should just change the password with secret and retur other
Key as it is without any removal or alter.

Ex.
>>> dk_dict = {'password': 'd81juxmEW_', 'user': 'admin', 'dkdk': None, 'home-dir': '/home/admin', 'kk': None}

>>> strutils.mask_dict_password(dlk, '***')
{'password': '***', 'user': u'admin', 'home-dir': u'/home/admin'}

Changed in oslo.utils:
assignee: nobody → dharmendra (dharmendra-kushwaha)
summary: - strutils.mask_dict_password() removes the keys with None values
+ Fix mask_dict_password for non string/dict type key in dict
description: updated
Changed in oslo.utils:
status: New → In Progress

This issue was fixed in the openstack/oslo.utils 3.16.0 release.

Changed in oslo.utils:
status: In Progress → Fix Released

This issue was fixed in the openstack/oslo.utils 3.16.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers