Attachment problem after upgrade

Hi everybody, we've recently upgraded our OTRS installation big-time, going from 2.2.8 w/SIRIOS via 2.2.8 w/o SIRIOS via 2.3.6 via 2.4.8 via 3.0.3 via 3.0.4 to 3.0.5. Unfortunately, attachments of inbound mails are not linked properly any more. The links to the attachments within a ticket have the following form: https://[ServerURL]/otrs/index.pl/file-2?Action=AgentTicketAttachment;ArticleID=134322;FileID=2 instead of (correctly) https://[ServerURL]/otrs/index.pl?Action=AgentTicketAttachment;ArticleID=134322;FileID=2 In other words, the string "/file-2" (which depends on the name of the attachment, of course) is mistakenly inserted between "index.pl" and "?". Does anyone have a pointer for me as to where to look? Thanks a lot! Cheers, Toby. -- Though I Fly Through the Valley of Death, I Shall Fear No Evil, For I Am 80,000 Feet and Climbing. ---Sign over the entrance to the SR-71 operating location on Kadena ---- Karlsruhe Institute of Technology (KIT) KIT-CERT Tobias Dussa CERT Manager/CA Manager Zirkel 2 Building 20.21 76131 Karlsruhe, Germany !!! New phone number Phone: +49 721 608-42479 !!! New fax number Fax: +49 721 608-9-42479 Email: tobias.dussa@kit.edu Web: http://www.kit.edu/ KIT – University of the State of Baden-Wuerttemberg and National Laboratory of the Helmholtz Association

Hi Tobias, On 15.02.2011, at 11:32, Tobias Dussa wrote:
we've recently upgraded our OTRS installation big-time, going from 2.2.8 w/SIRIOS via 2.2.8 w/o SIRIOS via 2.3.6 via 2.4.8 via 3.0.3 via 3.0.4 to 3.0.5. Unfortunately, attachments of inbound mails are not linked properly any more.
The links to the attachments within a ticket have the following form: https://[ServerURL]/otrs/index.pl/file-2?Action=AgentTicketAttachment;ArticleID=134322;FileID=2 instead of (correctly) https://[ServerURL]/otrs/index.pl?Action=AgentTicketAttachment;ArticleID=134322;FileID=2
In other words, the string "/file-2" (which depends on the name of the attachment, of course) is mistakenly inserted between "index.pl" and "?".
The reason why it has changed is, because it's a workaround for IE to support multi byte of attachment filenames. Usually the filename is in the http header (Content-Disposition), but IE is not able to get the data with multi byte filenames out there correctly. So the new URL (https://[ServerURL]/otrs/index.pl/file-2?Action...) will execute index.pl and for IE the file name is "file-2" (or in case a multi byte filenames) if you want to save the file. For all other browsers "/file-2" will not have any meaning because the file name is taken from http header (Content-Disposition). Any more questions? :) -Martin
Cheers, Toby. -- Though I Fly Through the Valley of Death, I Shall Fear No Evil, For I Am 80,000 Feet and Climbing. ---Sign over the entrance to the SR-71 operating location on Kadena

Hi, On Tue, Feb 15, 2011 at 12:20:35PM +0100, Martin Edenhofer wrote:
In other words, the string "/file-2" (which depends on the name of the attachment, of course) is mistakenly inserted between "index.pl" and "?". The reason why it has changed is, because it's a workaround for IE to support multi byte of attachment filenames.
Mmh. In our setup, this means the web server returns 500. :-(
So the new URL (https://[ServerURL]/otrs/index.pl/file-2?Action...) will execute index.pl
Erm, interesting... Our web server won't execute "index.pl" upon a request for "index.pl/something". Hm.
and for IE the file name is "file-2" (or in case a multi byte filenames) if you want to save the file. For all other browsers "/file-2" will not have any meaning because the file name is taken from http header (Content-Disposition).
Yeah, but why would the web server execute index.pl when it is told to load index.pl/something? Am I missing something obvious? Cheers, Toby. -- Why crawl through Windows when there are doors? ---- Karlsruhe Institute of Technology (KIT) KIT-CERT Tobias Dussa CERT Manager/CA Manager Zirkel 2 Building 20.21 76131 Karlsruhe, Germany !!! New phone number Phone: +49 721 608-42479 !!! New fax number Fax: +49 721 608-9-42479 Email: tobias.dussa@kit.edu Web: http://www.kit.edu/ KIT – University of the State of Baden-Wuerttemberg and National Laboratory of the Helmholtz Association

Hi Toby, On 15.02.2011, at 13:02, Tobias Dussa wrote:
In other words, the string "/file-2" (which depends on the name of the attachment, of course) is mistakenly inserted between "index.pl" and "?". The reason why it has changed is, because it's a workaround for IE to support multi byte of attachment filenames.
Mmh. In our setup, this means the web server returns 500. :-(
So the new URL (https://[ServerURL]/otrs/index.pl/file-2?Action...) will execute index.pl
Erm, interesting... Our web server won't execute "index.pl" upon a request for "index.pl/something". Hm.
What web server do you use? Can you add the config? -Martin http://edenhofer.de/

Hi, I just realized I didn't answer. On Tue, Feb 15, 2011 at 01:14:55PM +0100, Martin Edenhofer wrote:
So the new URL (https://[ServerURL]/otrs/index.pl/file-2?Action...) will execute index.pl Erm, interesting... Our web server won't execute "index.pl" upon a request for "index.pl/something". Hm. What web server do you use? Can you add the config?
We're running lighty. The problem, however, was not with the web server itself, but with an additional CGI script that we had installed between the server and OTRS for authorization purposes. (We're doing authentication based on X.509 certificates, and we wanted some additional layer of authorization in front of OTRS. So our solution was to do some address rewriting and redirect all requests through a simple script that did the authorization and forwarded all authorized requests to OTRS. It turns out that the script assumed that arguments are passed only after the "?" in the URL, which is clearly wrong. We fixed that, and everything works fine now.) Thanks for pointing me in the right direction! :) Cheers, Toby. -- Smith & Wesson---The original point-and-click interface! ---- Karlsruhe Institute of Technology (KIT) KIT-CERT Tobias Dussa CERT Manager, CA Manager Zirkel 2 Building 20.21 76131 Karlsruhe, Germany !!! New phone number Phone: +49 721 608-42479 !!! New fax number Fax: +49 721 608-9-42479 Email: tobias.dussa@kit.edu Web: http://www.kit.edu/ KIT – University of the State of Baden-Wuerttemberg and National Laboratory of the Helmholtz Association
participants (2)
-
Martin Edenhofer
-
Tobias Dussa