secretutils.constant_time_compare raise a exception
Bug #1772851 reported by
zhouchangxun
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.utils |
Fix Released
|
Undecided
|
zhouchangxun |
Bug Description
see follow code:
```python
import hmac
from oslo_utils import secretutils
first = hmac.new(
second = hmac.new(
print secretutils.
```
HMAC digest value is binary data('str' type in python2.x), not an ascii sequence,
so when using `constant_
exception in position `first.
Exception message like this:
UnicodeDeco
I test it in centos 7.1.
Changed in oslo.utils: | |
assignee: | nobody → zhouchangxun (zhouchangxun) |
status: | New → In Progress |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/570151
Review: https:/