SSL is not supported in the current PyPI version

Bug #1263107 reported by Chris Malton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openerp-client-lib
New
Undecided
Unassigned

Bug Description

When communicating with an OpenERP-based server which is reverse proxied through an SSL-enabled webserver, I receive this traceback:

Traceback (most recent call last):
  File "/opt/Junari/fileit/connectors/email.py", line 172, in poll
    self.source({ "message": obj, "outer": None, "class": "email"} ) # Raise the source
  File "/opt/Junari/fileit/connectors/__init__.py", line 51, in source
    if not sink.sink(data):
  File "/opt/Junari/fileit/connectors/crm.py", line 315, in sink
    if not self._is_valid_domain(id_from["From"]):
  File "/opt/Junari/fileit/connectors/crm.py", line 289, in _is_valid_domain
    uids = users_pool.search( [ ("email_address_id.address", "ilike", email_addr[email_addr.find("@"):] ) ] )
  File "/usr/local/lib/python2.7/dist-packages/openerplib/main.py", line 305, in proxy
    self.connection.check_login(False)
  File "/usr/local/lib/python2.7/dist-packages/openerplib/main.py", line 243, in check_login
    self.user_id = self.get_service("common").login(self.database, self.login, self.password)
  File "/usr/local/lib/python2.7/dist-packages/openerplib/main.py", line 180, in proxy
    result = self.connector.send(self.service_name, method, *args)
  File "/usr/local/lib/python2.7/dist-packages/openerplib/main.py", line 83, in send
    return getattr(service, method)(*args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1312, in single_request
    response.msg,
ProtocolError: <ProtocolError for server:443/xmlrpc/common: 400 Bad Request>

I believe this is caused by line 89 in openerplib/__init__.py as it forces HTTP communication regardless of port.
xmlrpclib supports SSL-based communication, so it should be possible to engineer this into the library with relatively little effort.

Revision history for this message
Chris Malton (chrism-u) wrote :

Just noticed that the latest version does support SSL - however the version in PyPI doesn't have this feature.

Please could I request that a new version be uploaded to PyPI.

summary: - SSL is not supported
+ SSL is not supported in the current PyPI version
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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