LP API broken in oneiric with python-httplib2 0.7.0-1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| lazr.restfulclient |
Critical
|
Unassigned | ||
| ubuntuone-couch |
Undecided
|
Unassigned | ||
| python-httplib2 (Ubuntu) |
Critical
|
Barry Warsaw | ||
| Oneiric |
Critical
|
Barry Warsaw | ||
| ubuntuone-couch (Ubuntu) |
Undecided
|
Unassigned | ||
| Oneiric |
Undecided
|
Unassigned |
Bug Description
In oneiric today, someone landed python-httplib2, merged from debian (0.6.0-5 -> 0.7.0-1).
Now, all my scripts are broken:
...
File "/usr/lib/
version=
File "/usr/lib/
credentials, service_root, cache, timeout, proxy_info, version)
File "/usr/lib/
self._wadl = self._browser.
File "/usr/lib/
response, content = self._request(url, media_type=
File "/usr/lib/
str(url), method=method, body=data, headers=headers)
File "/usr/lib/
url, method=method, body=body, headers=headers)
File "/usr/lib/
(response, new_content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/usr/lib/
LaunchpadOA
File "/usr/lib/
redirections, cachekey)
File "/usr/lib/
(response, content) = self._conn_
File "/usr/lib/
conn.connect()
File "/usr/lib/
self.
File "/usr/lib/
cert_
File "/usr/lib/
ciphers=
File "/usr/lib/
ciphers)
ssl.SSLError: [Errno 185090050] _ssl.c:340: error:0B084002:x509 certificate routines:
Is it a Launchpad issue? or is python-httplib2 really broken?
please advise.
Related branches
- j.c.sackett (community): Approve on 2011-06-16
-
Diff: 15 lines (+4/-1)1 file modifiedsrc/lazr/restfulclient/_browser.py (+4/-1)
- John O'Brien (community): Needs Information on 2012-01-12
- dobey (community): Needs Information on 2011-06-21
-
Diff: 11 lines (+1/-1)1 file modifiedubuntuone/couch/auth.py (+1/-1)
- Martin Pool (community): Approve on 2011-06-28
-
Diff: 15 lines (+1/-4)1 file modifiedsrc/lazr/restfulclient/_browser.py (+1/-4)
Abel Deuring (adeuring) wrote : | #1 |
tags: | added: oneiric |
Jean-Baptiste Lallement (jibel) wrote : | #2 |
Confirmed in Oneiric and reproducible with the code below:
"""
#!/usr/bin/python
from launchpadlib.
launchpad = Launchpad.
u = launchpad.
"""
Changed in python-httplib2 (Ubuntu): | |
importance: | Undecided → High |
status: | New → Triaged |
Changed in python-httplib2 (Ubuntu Oneiric): | |
importance: | High → Critical |
assignee: | nobody → Canonical Foundations Team (canonical-foundations) |
Martin Pool (mbp) wrote : | #3 |
fta pointed out in <https:/
Colin Watson (cjwatson) wrote : | #4 |
Barry, could you have a look at this, please?
Changed in python-httplib2 (Ubuntu Oneiric): | |
assignee: | Canonical Foundations Team (canonical-foundations) → Barry Warsaw (barry) |
Barry Warsaw (barry) wrote : | #5 |
Confirmed with the upstream Mercurial clone.
One odd thing about our Oneiric package. It doesn't look like a proper merge of upstream. In particular the CHANGELOG in the package does not match the CHANGELOG in the upstream clone. I haven't check to see if that might have gotten committed after the 0.7.0 release though.
This is interesting because the 0.7.0 news (in the upstream branch, not in the packaging branch) says the attached. disable_
0.7.0
The two major changes in this release are SSL Certificate
checking and App Engine support. By default the certificates
of an HTTPS connection are checked, but that can be disabled
via disable_
is that on App Engine there is a new connection object
that utilizes the urlfetch capabilities on App Engine, including
setting timeouts and validating certificates.
The following issues have been addressed:
Fixes issue 72. Always lowercase authorization header.
Fix issue 47. Redirects that become a GET should not have a body.
Fixes issue 19. Set Content-location on redirected HEAD requests
Fixes issue 139. Redirect with a GET on 302 regardless of the originating method.
Fixes issue 138. Handle unicode in headers when writing and retrieving cache entries. Who says headers have to be ASCII!
Add certificate validation. Work initially started by Christoph Kern.
Set a version number. Fixes issue # 135.
Sync to latest version of socks.py
Add gzip to the user-agent, in case we are making a request to an app engine project: http://
Uses a custom httplib shim on App Engine to wrap urlfetch, as opposed
Add default support for optimistic concurrency on PATCH requests
Fixes issue 126. IPv6 under various conditions would fail.
Fixes issue 131. Handle socket.timeout's that occur during send.
proxy support: degrade gracefully when socket.socket is unavailable
Changed in python-httplib2 (Ubuntu Oneiric): | |
status: | Triaged → Confirmed |
Barry Warsaw (barry) wrote : | #6 |
@Jean-Baptiste: Can you try something for me please?
After you get the traceback from the sample code in comment #2, try it exactly the same way again. For me the second time works perfectly (no traceback). I wonder if something's getting cached but not accessed correctly the first time, whereas the second time you run it, the cached file exists and it succeeds.
I think the _ssl traceback is masking a an ENOENT IOError. See this Python issue for why I think that:
http://
and especially this comment:
http://
If that's correct, then the bug is probably in launchpadlib.
Jean-Baptiste Lallement (jibel) wrote : | #7 |
I've tried your suggestion, but no matter how many times I try, I always get the traceback.
I also tried removing ~/.launchpadlib and with a freshly created profile, it doesn't make any difference.
---
Ubuntu Bug Squad volunteer triager
http://
Barry Warsaw (barry) wrote : | #8 |
@Jean-Baptiste: thanks, I think that was pebkac on my part, so ignore that. I can reproduce it every time too.
Interestingly, when stepping through httplib2, after the call to _ssl_wrap_socket() I get this error:
SSLError(8, '_ssl.c:503: EOF occurred in violation of protocol')
Hmm... Possibly a problem with Launchpad?
Barry Warsaw (barry) wrote : | #9 |
Okay, I think lazr.restfulcli
Changed in python-httplib2 (Ubuntu Oneiric): | |
status: | Confirmed → In Progress |
milestone: | none → oneiric-alpha-2 |
Martin Pool (mbp) wrote : Re: [Bug 797281] Re: LP API broken in oneiric with python-httplib2 0.7.0-1 | #10 |
Seems like there should be a follow on bug that it's vulnerable to mitm.
Barry Warsaw (barry) wrote : | #11 |
Perhaps. The thing is, it wasn't doing cert validation before, and with this change it's still not. I think validation would be a new feature for lazr.restfulclient (albeit a useful one!).
Robert Collins (lifeless) wrote : | #12 |
I think a new bug is essential; can you propose your existing
workaround to trunk though ?
Barry Warsaw (barry) wrote : | #13 |
LP: 798405 is the bug.
Merge proposal for workaround submitted on trunk.
Barry Warsaw (barry) wrote : | #14 |
ohai launchpad, please make that LP: #798405
Martin Pool (mbp) wrote : | #15 |
Thanks. I know you're not introducing a new bug, only discovering an
existing one, but it's worth having.
Changed in lazr.restfulclient: | |
status: | New → Triaged |
importance: | Undecided → Critical |
Changed in lazr.restfulclient: | |
status: | Triaged → In Progress |
assignee: | nobody → Barry Warsaw (barry) |
Changed in python-httplib2 (Ubuntu Oneiric): | |
status: | In Progress → Fix Released |
Barry Warsaw (barry) wrote : | #16 |
Unassigning myself from the lazr.restfulclient task since I cannot push to trunk.
Changed in lazr.restfulclient: | |
assignee: | Barry Warsaw (barry) → nobody |
Francis J. Lacoste (flacoste) wrote : | #17 |
Barrry, I added you to ~lazr-developers, you should be able to commit changes directly to lazr projects again. (You lost that once you were removed from the ~launchpad team.)
Graham has merged your branch in the mean time though.
Barry Warsaw (barry) wrote : | #18 |
On Jun 21, 2011, at 03:58 PM, Francis J. Lacoste wrote:
>Barrry, I added you to ~lazr-developers, you should be able to commit
>changes directly to lazr projects again. (You lost that once you were
>removed from the ~launchpad team.)
>
>Graham has merged your branch in the mean time though.
Thanks, and thanks!
-Barry
Michael Terry (mterry) wrote : | #19 |
This also affects ubuntuone-couch, which uses httplib2 to talk to one.ubuntu.com. I'll work on that.
Michael Terry (mterry) wrote : | #20 |
Barry, you said bug 798405 was the follow-on bug, but I don't see it. I get a 404 from LP going to that bug. Was there a typo?
Launchpad Janitor (janitor) wrote : | #21 |
This bug was fixed in the package ubuntuone-couch - 0.2.0-0ubuntu4
---------------
ubuntuone-couch (0.2.0-0ubuntu4) oneiric; urgency=low
* debian/
- Disable SSL validation because it isn't currently working with
one.
-- Michael Terry <email address hidden> Tue, 21 Jun 2011 13:52:46 -0400
Changed in ubuntuone-couch (Ubuntu Oneiric): | |
status: | New → Fix Released |
Barry Warsaw (barry) wrote : | #22 |
@Michael, nope it's there, but the bug is private.
Changed in lazr.restfulclient: | |
status: | In Progress → Fix Committed |
Roman Yepishev (rye) wrote : | #23 |
We need to get this http://
Roman Yepishev (rye) wrote : | #25 |
I created a new bug report for current SSL DNS name check here - LP:839826 - patch has migrated there.
Do not disable SSL checks in your packages due to DNS checks, this is httplib2 bug.
Changed in lazr.restfulclient: | |
milestone: | none → 0.14.0 |
Changed in lazr.restfulclient: | |
status: | Fix Committed → Fix Released |
milestone: | 0.14.0 → 0.12.0 |
Converted from https:/ /answers. launchpad. net/ubuntu/ +source/ python- httplib2/ +question/ 161415. I don't have yet oneiric installed. Fabien Tassin, who asked the question may be able to provide more information.