Merge lp:~stevenk/launchpad/handle-invalid-unicode-in-query-string-redux into lp:launchpad
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Steve Kowalik | ||||||||
Approved revision: | no longer in the source branch. | ||||||||
Merged at revision: | 16482 | ||||||||
Proposed branch: | lp:~stevenk/launchpad/handle-invalid-unicode-in-query-string-redux | ||||||||
Merge into: | lp:launchpad | ||||||||
Diff against target: |
566 lines (+114/-58) 18 files modified
lib/lp/app/browser/tales.py (+1/-1) lib/lp/bugs/interfaces/bug.py (+2/-2) lib/lp/bugs/model/bug.py (+8/-2) lib/lp/registry/interfaces/productrelease.py (+4/-6) lib/lp/registry/model/productrelease.py (+22/-17) lib/lp/registry/stories/webservice/xx-project-registry.txt (+17/-7) lib/lp/registry/subscribers.py (+2/-4) lib/lp/registry/tests/test_subscribers.py (+1/-1) lib/lp/services/webapp/escaping.py (+1/-1) lib/lp/services/webapp/menu.py (+1/-1) lib/lp/services/webapp/pgsession.py (+1/-1) lib/lp/services/webapp/publisher.py (+20/-2) lib/lp/services/webapp/servers.py (+12/-5) lib/lp/services/webapp/tests/test_menu.py (+2/-2) lib/lp/services/webapp/tests/test_servers.py (+15/-3) lib/lp/services/webapp/tests/test_user_requested_oops.py (+2/-1) lib/lp/services/webapp/tests/test_view_model.py (+2/-1) lib/lp/testing/tests/test_publication.py (+1/-1) |
||||||||
To merge this branch: | bzr merge lp:~stevenk/launchpad/handle-invalid-unicode-in-query-string-redux | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Grant | code | Approve | |
Review via email: mp+146773@code.launchpad.net |
Commit message
If we fail to decode the query string parameters, forcibly decode it to utf-8 with replacements, again. We also work around a Zope bug by grabbing the request and pulling the un-decoded file contents out for IProductRelease
Description of the change
This branch resurrects the changes from r1646[12] which were reverted due to discovering that lazr.restfulclient does not set filename on file uploads, so Zope will encode the contents, resulting in garbage being stored.
We work around this by grabbing the current request in the two exported methods (IProductReleas
I have also ripped out the export of get_current_
You'll want to also apply the hack to signature_content, but otherwise fine.