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)
Tracking
()
People
(Reporter: sync-1, Assigned: kanru)
References
()
Details
(Whiteboard: triaged, [TD-9598][QE1][fixed-in-birch])
Attachments
(1 file, 1 obsolete file)
1.31 KB,
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
+++ 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 ++++++++++
Comment 1•12 years ago
|
||
Dominic, could you help, or know who could help? Thanks.
Assignee: nobody → dkuo
Comment 3•12 years ago
|
||
This could potentially be a device storage bug. Including Doug just in case.
Comment 4•12 years ago
|
||
Yes, we filter out ~. the worry is a path like ~/
http://mxr.mozilla.org/mozilla-central/source/dom/devicestorage/nsDeviceStorage.cpp#359
Comment 5•12 years ago
|
||
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:
--- → ?
Comment 6•12 years ago
|
||
I checked the codes and it looks like we could have better filter criteria to filter out user home directory.
Comment 7•12 years ago
|
||
khu: yup. what we are doing is not really great.
Comment 8•12 years ago
|
||
Quick question - is the bug here technically at the Gaia level, device storage level, or both?
Comment 9•12 years ago
|
||
(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.
Comment 10•12 years ago
|
||
The size of the impacted user population will be so small that we can fix for the first time in v2.
Comment 11•12 years ago
|
||
Can we just not show files with ~ in their name in the music player?
Updated•12 years ago
|
Whiteboard: triaged
Comment 13•12 years ago
|
||
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.
Comment 14•12 years ago
|
||
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.
Updated•12 years ago
|
blocking-b2g: --- → leo?
Comment 15•12 years ago
|
||
Triage 4/12 - Leo- , this is nice to have but not blocking for release.
blocking-b2g: leo? → ---
Updated•12 years ago
|
status-b2g18:
--- → affected
Updated•12 years ago
|
Whiteboard: triaged → triaged, [TD-9598]
Comment 17•12 years ago
|
||
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?
Comment 18•12 years ago
|
||
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]
Updated•12 years ago
|
Target Milestone: --- → Leo QE1 (5may)
Comment 20•12 years ago
|
||
Triage 4/16 - Leo+ as blocking partner certification.
blocking-b2g: leo? → leo+
Assignee | ||
Comment 21•12 years ago
|
||
(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.
Assignee | ||
Comment 22•12 years ago
|
||
Attachment #738058 -
Flags: feedback?(doug.turner)
Comment 23•12 years ago
|
||
(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.
Assignee | ||
Comment 24•12 years ago
|
||
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 '~'.
Assignee | ||
Comment 25•12 years ago
|
||
Attachment #738058 -
Attachment is obsolete: true
Attachment #738058 -
Flags: feedback?(doug.turner)
Attachment #738393 -
Flags: review?(doug.turner)
Comment 26•12 years ago
|
||
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+
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 27•12 years ago
|
||
Keywords: checkin-needed
Whiteboard: triaged, [TD-9598][QE1] → triaged, [TD-9598][QE1][fixed-in-birch]
Comment 28•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 29•12 years ago
|
||
status-b2g18-v1.0.0:
--- → wontfix
status-b2g18-v1.0.1:
--- → wontfix
status-firefox21:
--- → wontfix
status-firefox22:
--- → wontfix
status-firefox23:
--- → fixed
Updated•12 years ago
|
Component: Gaia::Music → DOM: Device Interfaces
Product: Boot2Gecko → Core
Version: unspecified → Trunk
Updated•12 years ago
|
Flags: in-moztrap?
Updated•12 years ago
|
Flags: in-moztrap? → in-moztrap+
Updated•12 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•