• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item7263: viewfile needs to quote a file name containg commas in the content-disposition header field

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   major 6.0.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

There was a time when commas in an attachment file name were not removed. When such a file is retrieved by the viewfile script, Google Chrome (at least some verisons of it) refuses to load it while IE, Safari, and Firefox have no problem. This is caused by Chrome's peculiar way of handling the Content-Disposition response header field. Considering the ease of workaround and the benefit, this should be addressed.

There are two ways to deal with a comma in a file name in Content-Disposition - encode the comma (%2c) or quoting the entire file name (filename="filename.ext"). As far as I tested, both work fine with IE7/9, Firefox, and Chrome. If a comma is replaced with %2c, Firefox and Chrome recognize it literally not as a comma. On those browsers, when you save an attachment as a file, file%2cname.ext is suggested as the file name instead of file,name.ext. So the latter approach is desirable. And file name quoting will happen only if the file name contains something other than letters, digits, underscore, hyphen, or period.

TWiki removes commas in an attachment file name when it's attached. So this change doesn't affect newly uploaded files.

-- TWiki:Main/HideyoImazu - 2013-05-22

ItemTemplate
Summary viewfile needs to quote a file name containg commas in the content-disposition header field
ReportedBy TWiki:Main.HideyoImazu
Codebase ~twiki4
SVN Range TWiki-5.1.3-trunk, Mon, 13 May 2013, build 25914
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:25961 TWikirev:25962 TWikirev:25971 TWikirev:25972
TargetRelease major
ReleasedIn 6.0.0
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r10 - 2013-10-15 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback