Bug 895726 showed that we should not trust the incoming filename completely. We will ensure that the extension matches the blob mime type so that saving to a specific device storage will not fail.
I'd suggest that the best way to fix this is to test the filename for correctness before displaying the Save button. If the filename is invalid, don't allow the user to save. I think this is better than allowing the user to save with a modified filename. This way we don't break, but we don't do something different than what was requested by the invoking app.
Since htis is related to Bug 909372, I will work on this as well
Created attachment 803511 [details] link to pull request on github
Attachment #803511 - Flags: review?(dkuo)
Attachment #803511 - Attachment mime type: text/plain → text/html
Aras, I have new comments on github and please take a look on them, thanks!
Comment on attachment 803511 [details] link to pull request on github Aras, The revised patch looks good to me, and after you squashed it, please needinfo me when you are going to land it, I will do it for you, thanks.
Attachment #803511 - Flags: review?(dkuo) → review+
I added bug 852864 to the comment and squashed the commits. It should be ready for landing. Thanks Dominic.
Thanks!(Sorry I didn't notice the comment until today...) Landed on master: e60b1eb012a3c18cca25671ebeac32df8f9a98b0
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.