[Bug 1694261] Re: Crashes with UnicodeDecodeError when trying to handle paths with non-ascii chars
Mattia Rizzolo
mattia at mapreri.org
Mon May 29 12:00:59 UTC 2017
** Changed in: python-werkzeug (Ubuntu Trusty)
Assignee: (unassigned) => Mattia Rizzolo (mapreri)
** Changed in: python-werkzeug (Ubuntu Trusty)
Importance: Undecided => Medium
** Changed in: python-werkzeug (Ubuntu Trusty)
Status: New => In Progress
** Changed in: python-werkzeug (Ubuntu)
Status: In Progress => Fix Released
** Changed in: python-werkzeug (Ubuntu)
Assignee: Mattia Rizzolo (mapreri) => (unassigned)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-werkzeug in Ubuntu.
https://bugs.launchpad.net/bugs/1694261
Title:
Crashes with UnicodeDecodeError when trying to handle paths with non-
ascii chars
Status in python-werkzeug package in Ubuntu:
Fix Released
Status in python-werkzeug source package in Trusty:
In Progress
Bug description:
[Impact]
* I've discovered this in a MoinMoin instance I admin, where there
are pages with non-ascii character (i.e. àèéìòù), there trying to open
a page with said name yields
[:info] mod_wsgi (pid=29522, process='', application='wiki.ubuntu-it.org:8801|'): Loading WSGI script '/srv/wiki.ubuntu-it.org/www/moin.wsgi'.
[:error] mod_wsgi (pid=29522): Exception occurred processing WSGI script '/srv/wiki.ubuntu-it.org/www/moin.wsgi'.
[:error] Traceback (most recent call last):
[:error] File "/srv/wiki.ubuntu-it.org/www/moin.wsgi", line 71, in __call__
[:error] return self.app(environ, start_response)
[:error] File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 558, in __call__
[:error] cleaned_path = cleaned_path.encode(sys.getfilesystemencoding())
[:error] UnicodeEncodeError: 'ascii' codec can't encode character u'\\xe0' in position 37: ordinal not in range(128)
[Test Case]
* I had a test case there, so I just tried to patch it, saw it works,
great. I'm sorry I'm not able to provide a better test case.
[Regression Potential]
* The patch only changes all sys.getfilesystemencoding() calls with a local function, wrapping the same original call. The overall changeset seems low on regression potential.
* I've installed the proposed package in the wiki.ubuntu-it.org server and it is working :)
[Other Info]
* This is upstream bug https://github.com/pallets/werkzeug/issues/635 - fixed with upstream commit https://github.com/pallets/werkzeug/commit/bba0cdcc67d4a1160d4ed9d3f99aef170a79dd88 and released in version 0.11 and present in yakkety+.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-werkzeug/+bug/1694261/+subscriptions
More information about the foundations-bugs
mailing list