mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-27 09:55:58 +03:00
[GH-ISSUE #459] Downloading/exporting filters with unicode fails #444
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#444
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tonioo on GitHub (Dec 4, 2013).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/459
Originally assigned to: @tonioo on GitHub.
Originally created by Miroslav Abrahám on 2013-09-10T18:10:49Z
Exporting filter sets with unicode chars in name may fail with this error:
Traceback: File "/usr/local/lib/python2.7/dist-packages/Django-1.5.2-py2.7.egg/django/core/handlers/base.py" in get_response 115. response = callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python2.7/dist-packages/Django-1.5.2-py2.7.egg/django/contrib/auth/decorators.py" in _wrapped_view 25. return view_func(request, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/modoboa-1.0.0-py2.7.egg/modoboa/lib/decorators.py" in wrapped_f 19. return f(request, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/modoboa-1.0.0-py2.7.egg/modoboa/extensions/sievefilters/views.py" in download_filters_set 266. resp["Content-Disposition"] = 'attachment; filename="%s.txt"' % name File "/usr/local/lib/python2.7/dist-packages/Django-1.5.2-py2.7.egg/django/http/response.py" in __setitem__ 110. value = self._convert_to_charset(value, 'latin1', mime_encode=True) File "/usr/local/lib/python2.7/dist-packages/Django-1.5.2-py2.7.egg/django/http/response.py" in _convert_to_charset 105. raise BadHeaderError("Header values can't contain newlines (got %r)" % value) Exception Type: BadHeaderError at /sfilters/downloadfs/ršwr šř ščěřěš/ Exception Value: Header values can't contain newlines (got '=?utf-8?b?YXR0YWNobWVudDsgZmlsZW5hbWU9InLFoXdyIMWhxZkgxaHEjcSbxZnEm8Wh?=\n =?utf-8?b?LnR4dCI=?=')There obviously is no new line in my filters.
Trying to play with a little bit more, clicking on the download link when the filter set does contain unicode chars may also result in a file not having any name. While in Chrome the file opens directly, in Firefox for instance it has no name preset (see the attached picture).
@tonioo commented on GitHub (Dec 4, 2013):
Posted by Antoine Nguyen on 2013-09-17T06:44:24Z
Applied in changeset commit:5e87fc764c4599d24929b500c242619aa5a2a803.