Downloading files whose name starts with '.' doesn't preserve their name

RESOLVED WONTFIX

Status

()

RESOLVED WONTFIX
2 years ago
2 years ago

People

(Reporter: claudiu.saiz, Unassigned)

Tracking

49 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20161028133011

Steps to reproduce:

OS: Linux Mint 17
Firefox version: 49.0.2 (also reproduces with 50.0.2)

I downloaded an attachment file named '.vimrc'.


Actual results:

The file on disk was not saved with the same name as on the web server, but with the dot removed. In this case the file was saved on disk as 'vimrc'.


Expected results:

The file should have been saved with the same name as on the web server.

Comment 1

2 years ago
Link to the file, please?
Component: Untriaged → File Handling
Flags: needinfo?(claudiu.saiz)
(Reporter)

Comment 2

2 years ago
I can't of course post a link to the e-mail attachment, but here is a file you can use to reproduce the bug: http://s000.tinyupload.com/?file_id=91166544173940996769

Or simpler, if you have a webserver lying around, just create a file starting with '.' on it and try to download it.
Flags: needinfo?(claudiu.saiz)

Comment 3

2 years ago
It's probably by design, see bug 346994.
(Reporter)

Comment 4

2 years ago
bug 346994 isn't in a done state, so I don't know if a consensus was reached on this.

In my opinion this is really bad behavior, it should at least give you an option or notify you that it's changing the file name. I've wasted time trying to figure out why the configuration doesn't work when in fact the file's name wasn't even saved correctly.

Comment 5

2 years ago
(In reply to claudiu.saiz from comment #4)
> In my opinion this is really bad behavior, it should at least give you an
> option or notify you that it's changing the file name. I've wasted time
> trying to figure out why the configuration doesn't work when in fact the
> file's name wasn't even saved correctly.

I understand that it can add more steps when you want to save a configuration file intentionally, but we have to strip the leading dot because, if we didn't do this, users could inadvertently overwrite their configuration files, resulting in security issues and data loss. We'd rather require more discipline from experienced users who actually need to edit their configuration files, than provide a way to corrupt the system inadvertently.

This is covered in more detail in bug 290720.

Because of this, sites that offer downloads of sample configuration files should add a reminder to check the file name after the download finished.

> bug 346994 isn't in a done state, so I don't know if a consensus was reached
> on this.

This bug was about stripping the leading dot in SeaMonkey, and it's been implemented, so I've marked the bug as resolved.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.