Bug 1365910 - ovirtsdk.api.API in ovirt-engine-sdk-python 3.6.x does not accept Unicode passwords
Summary: ovirtsdk.api.API in ovirt-engine-sdk-python 3.6.x does not accept Unicode pas...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk-python
Version: 3.6.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-3.6.9
: ---
Assignee: Ondra Machacek
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks: 1213937
TreeView+ depends on / blocked
 
Reported: 2016-08-10 13:20 UTC by Petr Spacek
Modified: 2016-09-21 17:55 UTC (History)
4 users (show)

Fixed In Version: rhevm-sdk-python-3.6.9.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-21 17:55:07 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1923 0 normal SHIPPED_LIVE 3.6.9 - rhevm-sdk-python bug fix update 2016-09-21 21:48:46 UTC
oVirt gerrit 62228 0 sdk_3.6 MERGED Support to pass username and password as unicode 2020-09-10 13:52:18 UTC

Description Petr Spacek 2016-08-10 13:20:37 UTC
Description of problem:
Previously, ovirt-engine-sdk-python 3.5.x provided API object ovirtsdk.api.API which accepted Unicode "password" parameter in its constructor.

ovirt-engine-sdk-python 3.6.x now fails to initialize the API with cryptic error instead of accepting the password as it did before.


Version-Release number of selected component (if applicable):
ovirt-engine-sdk-python-3.6.8.0-1.el7ev
python-pycurl-7.19.0-19.el7.x86_64
curl-7.29.0-32.el7.x86_64
libcurl-7.29.0-32.el7.x86_64

How reproducible:
100 %

Steps to Reproduce:
1. Install ovirt-engine-sdk-python-3.6.8.0-1.el7ev
2. Attempt to initialize RHEV API using Unicode password:
$ python -c 'import ovirtsdk.api; ovirtsdk.api.API("https://rhevm.abc.idm.lab.eng.brq.redhat.com", insecure=True, password=u"blah")'

Actual results:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/ovirtsdk/api.py", line 191, in __init__
    url=''
  File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/proxy.py", line 122, in request
    persistent_auth=self.__persistent_auth
  File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/connectionspool.py", line 79, in do_request
    persistent_auth)
  File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/connectionspool.py", line 97, in __do_request
    self.__curl.setopt(pycurl.USERPWD, "%s:%s" % (self.__username, self.__password))
TypeError: invalid arguments to setopt


Expected results:
It should work as in 3.5.x SDK.

Comment 1 Petr Spacek 2016-08-10 13:51:07 UTC
Interestingly, it works even if I install ovirt-engine-sdk-python-3.6.8.0-1.el7ev.noarch to Fedora 24.

On RHEL 7 it works with rhevm-sdk-python-3.5.6.0-1.el7ev.noarch. It stops working as soon as I upgrade to rhevm-sdk-python-3.6.0.0-1.el7ev.noarch (while not changing any other packages!).

Comment 5 Lucie Leistnerova 2016-09-12 08:15:09 UTC
verified in rhevm-sdk-python-3.6.9.1-1.el6ev.noarch

Comment 7 errata-xmlrpc 2016-09-21 17:55:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-1923.html


Note You need to log in before you can comment on or make changes to this bug.