← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1694261] Re: Crashes with UnicodeDecodeError when trying to handle paths with non-ascii chars

 

** Also affects: python-werkzeug (Ubuntu Xenial)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
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
Status in python-werkzeug source package in Xenial:
  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]

   * https://bugs.launchpad.net/ubuntu/+source/python-
  werkzeug/+bug/1694261/+attachment/4886272/+files/test.py

  [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