You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the ICS export on a speaker page on the schedule, if the speaker has non latin1 letters in his name, pretalx will return Internal Server Error.
Expected Behavior
The ICS export should be generated and downloadable.
Steps to Reproduce
Go to a public speaker page, of a speaker with non latin1 letters.
It defines a HTTP header containing the speaker name, which can contain non latin1 letters.
I encountered the issue with Gunicorn 19.9.0, which was more restrictive and required ASCII-only letters. I had issues with the following speaker: https://pretalx.jdll.org/jdll2019/speaker/PE93CF/:
[2019-12-16 19:28:09 +0000] [8407] [ERROR] Error handling request /jdll2019/speaker/PE93CF/talks.ics
Traceback (most recent call last):
File "/var/pretalx/.local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 135, in handle
self.handle_request(listener, req, client, addr)
File "/var/pretalx/.local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 182, in handle_request
resp.write(item)
File "/var/pretalx/.local/lib/python3.6/site-packages/gunicorn/http/wsgi.py", line 333, in write
self.send_headers()
File "/var/pretalx/.local/lib/python3.6/site-packages/gunicorn/http/wsgi.py", line 329, in send_headers
util.write(self.sock, util.to_bytestring(header_str, "ascii"))
File "/var/pretalx/.local/lib/python3.6/site-packages/gunicorn/util.py", line 507, in to_bytestring
return value.encode(encoding)
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 180: ordinal not in range(128)
This has been changed in this commit: benoitc/gunicorn@879651b. Now Gunicorn require latin1-only letters, which is less restrictive. With Gunicorn 20.0.4, I cannot reproduce the error as we don't have speakers with non-latin1 letters.
This is not exactly a pretalx issue, since gunicorn is not a dependency and there are other WSGI servers out there, but I guess we should do the best we can in this case.
Older gunicorn versions are sensitive to non-ASCII filenames in
attachment headers. We're using reasonable amounts of effort to convert
composed letters to their ascii main parts, or just drop them silently.
Closes#841
Hi,
Current Behavior
When using the ICS export on a speaker page on the schedule, if the speaker has non latin1 letters in his name, pretalx will return
Internal Server Error
.Expected Behavior
The ICS export should be generated and downloadable.
Steps to Reproduce
Context
I think that the issue comes from this line:
pretalx/src/pretalx/agenda/views/speaker.py
Line 88 in 05b0203
It defines a HTTP header containing the speaker name, which can contain non latin1 letters.
I encountered the issue with Gunicorn 19.9.0, which was more restrictive and required ASCII-only letters. I had issues with the following speaker: https://pretalx.jdll.org/jdll2019/speaker/PE93CF/:
This has been changed in this commit: benoitc/gunicorn@879651b. Now Gunicorn require latin1-only letters, which is less restrictive. With Gunicorn 20.0.4, I cannot reproduce the error as we don't have speakers with non-latin1 letters.
It seems that this instance uses an older version of Gunicorn, which requires ASCII-only letters: https://cfp.verschwoerhaus.de/wdwe19/speaker/EJYX78/.
This issue is less problematic when using Latin alphabet with a recent Gunicorn version, but can still be inconvenient for non Latin letters.
One solution could be replacing the speaker name by the speaker code in the filename.
Your Environment
The text was updated successfully, but these errors were encountered: