Fix mask_dict_password for non string/dict type key in dict

Bug #1600168 reported by dharmendra
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
oslo.utils
Fix Released
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
Revision history for this message
dharmendra (dharmendra-kushwaha) wrote :
Changed in oslo.utils:
status: New → In Progress
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/oslo.utils 3.16.0

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

Changed in oslo.utils:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.