Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Title should be default file name when saving page #2231

Closed
luixxiul opened this issue Jun 18, 2016 · 2 comments
Closed

Title should be default file name when saving page #2231

luixxiul opened this issue Jun 18, 2016 · 2 comments
Labels
fixed-with-brave-core This issue will automatically resolved with the replacement of Muon with Brave Core. sec-low security suggestion wontfix

Comments

@luixxiul
Copy link
Contributor

From support:

When saving webpages, Brave prefers the .html file name and sometimes defaults to just the domain name. For instance, with this page: http://www.breitbart.com/jerusalem/2016/06/17/israeli-judge-approves-400-million-class-action-facebook-violating-privacy/

Saving it defaults to "www.breitbart.com," but this becomes a nuisance if you have more than one page from this site saved, as you have to manually adjust the name.

+1 from me too

@luixxiul
Copy link
Contributor Author

luixxiul commented Aug 3, 2016

I think this will be a security hole if someone puts a malicious file on maliciousfilehere.com because the page is saved as a ms-dos program by default. It should be at least like maliciousfilehere.com.html. The file extension should be properly selected. #1985

On Firefox for example,

clipboard01

Here ``.comhas been replaced with.htm` automatically.

@gulkily
Copy link

gulkily commented Aug 25, 2016

I have done some thinking about this issue, and it seems like there should be a little more logic to it. I suggest the following:

Is the file served with content-type: text/html
AND
Does the URL (before question mark) end with ".html"?
Save it as /everything-after-the-last-slash.html

Does the page have a title?
Save it as Sanitized Title.html

No title?
Take everything after the domain, sanitize, and add .html

Nothing after the domain?
Save it as domain.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-with-brave-core This issue will automatically resolved with the replacement of Muon with Brave Core. sec-low security suggestion wontfix
Projects
None yet
Development

No branches or pull requests

5 participants