Tab and return characters in attachment titles gives IOError in Apache error log

Bug #616511 reported by Jim B. Glenn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL3
Fix Released
Medium
Chris Rossi

Bug Description

This does not produce a KARL General Error, instead displays error from apache.

From end user:
I've not been able to download two of the attachments, one by Prof. Jonathan
Klaaren and the other, a research report by the Justice Initiative.

From Nat:
No, it’s OSI, but a file in the community is throwing up an Internal Server Error, which explains how he got the SFU email address. I think there must have been a problem with the file the user uploaded (https://karl.soros.org/communities/osi-africa-wide-foi-rti-advocacy-and-litigation-meeting-nairobi-kenya-august-16-18-2010/blog/background-reading-part-1-right-to-information-in-southern-africa/attachments/paia-though-the-courts-v-2b1-by-professor-jonathan-klaaren-11-08-10.pdf/). I’ll contact the original poster and see if she can re upload it. If you try to download the file, you’ll see the error message.

Thanks,
Nat

From the apache error_log:

[Wed Aug 11 16:47:53 2010] [error] [client 74.203.223.219] mod_wsgi (pid=12284): Exception occurred processing WSGI script '/opt/karl/osi/current/etc/wsgi-scripts/karl3.wsgi'.
[Wed Aug 11 16:47:53 2010] [error] [client 74.203.223.219] IOError: failed to write data
[Wed Aug 11 16:48:40 2010] [error] [client 74.203.223.219] mod_wsgi (pid=12284): Exception occurred processing WSGI script '/opt/karl/osi/current/etc/wsgi-scripts/karl3.wsgi'.
[Wed Aug 11 16:48:40 2010] [error] [client 74.203.223.219] ValueError: embedded newline in response header with name 'Content-Disposition' and value 'attachment; filename=PAIA Though the Courts v 2b1 by Professor Jonathan Klaaren 11
[Wed Aug 11 16:48:40 2010] [error] [client 74.203.223.219] \t08 10.pdf'
[Wed Aug 11 16:55:03 2010] [error] [client 24.172.160.66] mod_wsgi (pid=12284): Exception occurred processing WSGI script '/opt/karl/osi/current/etc/wsgi-scripts/karl3.wsgi'.
[Wed Aug 11 16:55:03 2010] [error] [client 24.172.160.66] ValueError: embedded newline in response header with name 'Content-Disposition' and value 'attachment; filename=PAIA Though the Courts v 2b1 by Professor Jonathan Klaaren 11
[Wed Aug 11 16:55:03 2010] [error] [client 24.172.160.66] \t08 10.pdf'
[Wed Aug 11 16:55:31 2010] [error] [client 41.205.230.43] mod_wsgi (pid=12284): Exception occurred processing WSGI script '/opt/karl/osi/current/etc/wsgi-scripts/karl3.wsgi'.
[Wed Aug 11 16:55:31 2010] [error] [client 41.205.230.43] ValueError: embedded newline in response header with name 'Content-Disposition' and value 'attachment; filename=PAIA Though the Courts v 2b1 by Professor Jonathan Klaaren 11
[Wed Aug 11 16:55:31 2010] [error] [client 41.205.230.43] \t08 10.pdf'

Revision history for this message
Jim B. Glenn (jimbglenn) wrote :
Revision history for this message
Chris Rossi (chris-archimedeanco) wrote :

Converted retry functionality used when running console scripts as daemons to be time based rather than number of iterations based. By default, now, if a daemon script gets ConflictErrors, it will retry once a minute for 30 minutes. If unable to fulfill its duties for 30 minutes, it will raise an exception which will trigger all of the usual alarm bells.

Revision history for this message
Jim B. Glenn (jimbglenn) wrote :

From Nat:

I think I’ve fixed the problem now, so we should be good now…

Think he made the user reupload the files, but still an underlying issue?

-Jim

Revision history for this message
Chris Rossi (chris-archimedeanco) wrote :

Ignore my comment #2 above. Meant for a different ticket.

summary: - OSI PROD- mod-wsgi 500 error on download file in a community
+ Tab and return characters in attachment titles gives IOError in Apache
+ error log
Changed in karl3:
assignee: nobody → Chris Rossi (chris-archimedeanco)
importance: Undecided → Medium
milestone: none → m46
Revision history for this message
Carlos de la Guardia (cguardia) wrote :

I tried to help out with this one, but was not able to reproduce the error, sorry.

Changed in karl3:
milestone: m46 → m47
Changed in karl3:
status: New → In Progress
Revision history for this message
Chris Rossi (chris-archimedeanco) wrote :

Tabs and newline characters are now stripped from filenames as they are uploaded. They are also stripped out at download time, in case any files were uploaded previously with tabs or newlines in their filenames.

Changed in karl3:
status: In Progress → Fix Committed
Revision history for this message
JimPGlenn (jpglenn09) wrote :

no way to test but reported fixed by jim@sfu and chris rossi

Changed in karl3:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.