Closed Bug 845707 Opened 12 years ago Closed 12 years ago

[Buri][Music] Songs title with "~" can not be played.

Categories

(Core :: DOM: Device Interfaces, defect, P2)

ARM
Gonk (Firefox OS)
defect

Tracking

()

RESOLVED FIXED
1.1 QE1 (5may)
blocking-b2g leo+
Tracking Status
firefox21 --- wontfix
firefox22 --- wontfix
firefox23 --- fixed
b2g18 + fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- wontfix

People

(Reporter: sync-1, Assigned: kanru)

References

()

Details

(Whiteboard: triaged, [TD-9598][QE1][fixed-in-birch])

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #410657 +++ DEFECT DESCRIPTION: Songs title with "~" can not be played. REPRODUCING PROCEDURES: IF the song title contain "~" ,it can not be played.--->KO If the directery name contain "~", same problem found. EXPECTED BEHAVIOUR: Can play normally. ASSOCIATE SPECIFICATION: TEST PLAN REFERENCE: TOOLS AND PLATFORMS USED: USER IMPACT: REPRODUCING RATE: For FT PR, Please list reference mobile's behavior: ++++++++++ end of initial bug #410657 description ++++++++++
Dominic, could you help, or know who could help? Thanks.
Assignee: nobody → dkuo
This could potentially be a device storage bug. Including Doug just in case.
songs with "~" showed up in music app but cannot play music. Seem like a bug we need to fix. dkuo/doug, any thoughts? thanks
tracking-b2g18: --- → ?
I checked the codes and it looks like we could have better filter criteria to filter out user home directory.
khu: yup. what we are doing is not really great.
Quick question - is the bug here technically at the Gaia level, device storage level, or both?
(In reply to Jason Smith [:jsmith] from comment #8) > Quick question - is the bug here technically at the Gaia level, device > storage level, or both? This is an issue at device storage level I believe, cause when music player is trying to retrieve the audio file that starts with "~", that file does exist but device storage will return a SecurityError, and music player is unable to play that file.
The size of the impacted user population will be so small that we can fix for the first time in v2.
Can we just not show files with ~ in their name in the music player?
Whiteboard: triaged
I think that this is a DeviceStorage limititation. Right now, device storage ignores all files with ~ in them. I think it should only ignore files with leading tildes in them. The leading tilde thing is to prevent ~username from redirecting outside the filesystem. Embedded tildes are common, especially on FAT filesystems. You'll often see files like SOMELO~1.png because it didn't fit in an 8.3 format.
Personally, I think that tildes in the filenames, leading or otherwise, should be legal. The filesystem doesn't do ~ expansion, the shell does. device storage shouldn't be calling any APIs which do tilde expansion, so there shouldn't be any security issues.
blocking-b2g: --- → leo?
Triage 4/12 - Leo- , this is nice to have but not blocking for release.
blocking-b2g: leo? → ---
Whiteboard: triaged → triaged, [TD-9598]
This issue leads two problem on the device. 1. Video thumbnail is shown on video app but it cannot be played. (music and gallery application have same problem) 2. Since video application doesn't consider errors, device freezed after trying to play these kind of video clip. So, the mimetype cannot be fixed, those application should not list up the files that have "~" character in its file name.
blocking-b2g: --- → leo?
This issue has been identified as a QE1 blocker. Per comment #13 and comment #14, it seems like we need better handling here.
Whiteboard: triaged, [TD-9598] → triaged, [TD-9598][QE1]
Target Milestone: --- → Leo QE1 (5may)
Kanru, can you help on this? thanks.
Assignee: dkuo → kchen
Triage 4/16 - Leo+ as blocking partner certification.
blocking-b2g: leo? → leo+
(In reply to Dave Hylands [:dhylands] from comment #14) > Personally, I think that tildes in the filenames, leading or otherwise, > should be legal. The filesystem doesn't do ~ expansion, the shell does. > device storage shouldn't be calling any APIs which do tilde expansion, so > there shouldn't be any security issues. Unfortunately the underlying nsLocalFileUnix implementation do expend the path if it begins with '~' or '~/'. I think the correct way to handle this is to have a version that doesn't expand it.
Attachment #738058 - Flags: feedback?(doug.turner)
(In reply to Kan-Ru Chen [:kanru] from comment #21) > (In reply to Dave Hylands [:dhylands] from comment #14) > > Personally, I think that tildes in the filenames, leading or otherwise, > > should be legal. The filesystem doesn't do ~ expansion, the shell does. > > device storage shouldn't be calling any APIs which do tilde expansion, so > > there shouldn't be any security issues. > > Unfortunately the underlying nsLocalFileUnix implementation do expend the > path if it begins with '~' or '~/'. > > I think the correct way to handle this is to have a version that doesn't > expand it. Well we should still never be creating an nsLocalFileUnix using the pathname from deviceStorageFile. We should always be creating the pathname by concatenating the root directory with deviceStorageFile path. We should make sure that the root portion is never empty, or if it is make it be ./ Then there would never be any ~ expansion.
It seems we always set a root directory for each deviceStorage. The check is relatively fast so I want to keep it and output a warning if we get a path name that starts with '~'.
Attachment #738058 - Attachment is obsolete: true
Attachment #738058 - Flags: feedback?(doug.turner)
Attachment #738393 - Flags: review?(doug.turner)
Comment on attachment 738393 [details] [diff] [review] Bug 845707 - Only filter file path that is a '~' or starts with '~/' Review of attachment 738393 [details] [diff] [review]: ----------------------------------------------------------------- i think we care less about other platforms now.
Attachment #738393 - Flags: review?(doug.turner) → review+
Keywords: checkin-needed
Keywords: checkin-needed
Whiteboard: triaged, [TD-9598][QE1] → triaged, [TD-9598][QE1][fixed-in-birch]
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: Gaia::Music → DOM: Device Interfaces
Product: Boot2Gecko → Core
Version: unspecified → Trunk
Flags: in-moztrap?
Flags: in-moztrap? → in-moztrap+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: