[Gallery] Improve view activity saving feature robustness

RESOLVED FIXED

Status

Firefox OS
Gaia::Gallery
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: gerard, Assigned: Aras Balali Moghaddam)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:koi+)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
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.
(Reporter)

Updated

5 years ago
blocking-b2g: --- → koi?
Summary: Improve view activity saving feature robustness → [Gallery] Improve view activity saving feature robustness
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.
(Assignee)

Comment 2

5 years ago
Hi, this bug looks interesting to me. I will start working on it, if there are no objections.
Aras is working on this bug. I change the assignee to him. Thanks Aras.
Assignee: nobody → arasbm
(Assignee)

Comment 4

5 years ago
Created attachment 803449 [details]
bug-909372-PR.html

John Hu, thanks for your help with this issue. I am setting you as the reviewer since you are familiar with this bug and solution.
Attachment #803449 - Flags: review?(johu)
(Assignee)

Updated

5 years ago
Attachment #803449 - Attachment mime type: text/plain → text/html
Comment on attachment 803449 [details]
bug-909372-PR.html

Thanks for this patch. r=me.
Attachment #803449 - Flags: review?(johu) → review+
merged to master:
https://github.com/mozilla-b2g/gaia/commit/a8ae01b29d25f9bf7cdb4199ddbca0a6c7bde514
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 7

5 years ago
Did this make it to 1.2 (looks like it was merged right about when 1.2 branching happened). John or Aras - could you confirm?
Hema,

I can confirm that it is merged to 1.2.

Updated

5 years ago
blocking-b2g: koi? → koi+
You need to log in before you can comment on or make changes to this bug.