Edgewall Software
Modify

Ticket #3507 (closed defect: wontfix)

Opened 6 years ago

Last modified 5 years ago

unable to correctly upload a file containing a slash ("/")

Reported by: roddi@… Owned by: jonas
Priority: normal Milestone:
Component: general Version: 0.9
Severity: normal Keywords: attachment macosx
Cc:
Release Notes:
API Changes:

Description

Hi,

Ok, first let's put the discussion aside why someone would want to have a filename containing a slash. I know it's stupid, especially on UNIX-like systems but at least on Mac OS X it is possible to have them and users sooner or later do anything that's possible…

Summary:
Is impossible to upload a file containing a slash correctly.

Steps to Reproduce:

  1. create a file called a/b.txt (see screenshot)
  1. attach it

Expected Results:

the attached file should be called a/b.txt

Actual Results:

the attached file is be called b.txt

Notes:

  1. I have attached the file from the screenshot
  1. This might be a duplicate of Ticket #2981
  1. My configuration:

Server:

Power Mac G4 Mac OS X 10.4.7
running trac 0.9

Client:

iMac Intel Mac OS X 10.4.7
Safari 2.0.4

regards,

Roddi

Attachments

b.txt (7 bytes) - added by roddi@… 6 years ago.
the file that is originally called "a/b.txt"
scrsh-example.jpg (19.8 KB) - added by roddi@… 6 years ago.
screenshot of a Finder window containing the example file

Download all attachments as: .zip

Change History

Changed 6 years ago by roddi@…

the file that is originally called "a/b.txt"

Changed 6 years ago by roddi@…

screenshot of a Finder window containing the example file

comment:1 Changed 6 years ago by anonymous

from the shell:

roddi@sauron ~/Desktop/example % ls -l 
total 1
-rw-r--r--   1 roddi  ilink  7 Aug  3 11:12 a:b.txt

comment:2 Changed 6 years ago by eblot

RFC1867 which documents file upload from an HTML form is not really clear about how to deal with filenames. Non-ASCII chars should be encoded, but the '/' and the ':' chars are pure ASCII. I did not manage to find references about this MacOS specific issue.

However, I don't think the server can store a file with a filename that contains '/' characters, as I don't see how a non-Macintosh computer could deal with such a pathname at download time.

The best option to preserve the client platform interoperability for now would be to follow the RFC1867 proposal for non-ASCII filenames: "the file name might be approximated".

'/' and ':' could be replaced with a OS neutral character such as the underscore.

comment:3 Changed 5 years ago by cboos

  • Keywords attachment macosx added
  • Resolution set to wontfix
  • Status changed from new to closed

We don't want to support filenames with "/" inside, as they're really not portable and it will break the assumption we're making for the attachment URLs.

If the error message is not clear, we could improve it.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from jonas. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.