Closed
Bug 789617
Opened 13 years ago
Closed 13 years ago
Improve vorbis comment validation
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla18
People
(Reporter: rillian, Assigned: rillian)
Details
Attachments
(2 files, 3 obsolete files)
2.58 KB,
patch
|
cpearce
:
review+
|
Details | Diff | Splinter Review |
9.04 KB,
patch
|
rillian
:
review+
|
Details | Diff | Splinter Review |
Currently we don't do careful validation of vorbis comments when returning metadata.
This bug is about adding checks to be more strict.
Assignee | ||
Comment 1•13 years ago
|
||
Assignee: nobody → giles
Assignee | ||
Comment 2•13 years ago
|
||
Updated patch. Validates tag names using the correct subset of ASCII.
Attachment #659391 -
Attachment is obsolete: true
Assignee | ||
Comment 3•13 years ago
|
||
Corresponding tests to verify the new validation code. Also cleans up the test_metadata.html status messages a bit.
Assignee | ||
Comment 4•13 years ago
|
||
pushed to try https://tbpl.mozilla.org/?tree=Try&rev=a3d392bfe049
Assignee | ||
Comment 5•13 years ago
|
||
Comment on attachment 659846 [details] [diff] [review]
proposed fix
Ready for review.
Attachment #659846 -
Flags: review?(cpearce)
Assignee | ||
Updated•13 years ago
|
Attachment #659884 -
Flags: review?(cpearce)
Comment 6•13 years ago
|
||
Comment on attachment 659884 [details] [diff] [review]
corresponding tests
Review of attachment 659884 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/media/test/manifest.js
@@ +347,5 @@
> }
> },
> + { name:"sound.ogg", tags: { } },
> + { name:"badtags.ogg", tags: {
> + // We list only the valid tags here, and verify
It would be good to include the list of invalid tags that are filtered out here too, for code future reference.
Attachment #659884 -
Flags: review?(cpearce) → review+
Comment 7•13 years ago
|
||
Comment on attachment 659846 [details] [diff] [review]
proposed fix
Review of attachment 659846 [details] [diff] [review]:
-----------------------------------------------------------------
::: content/media/ogg/nsOggReader.cpp
@@ +162,5 @@
>
> +static bool IsValidVorbisTagName(nsCString& name)
> +{
> + // Vorbis comment tag names must be ASCII.
> + if (!IsASCII(name)) {
I don't think you need to call IsASCII(); your loop below does a more restrictive version of the same check that IsASCII() does, so you'll be doing more work than necessary.
Attachment #659846 -
Flags: review?(cpearce) → review+
Assignee | ||
Comment 8•13 years ago
|
||
You're right. I've removed the IsASCII check, which also let me simplify the logging by several lines.
Attachment #659846 -
Attachment is obsolete: true
Attachment #659970 -
Flags: review?(cpearce)
Assignee | ||
Comment 9•13 years ago
|
||
Updated tests, adding comments describing the invalid tags we verify the implementation is skipping.
Carrying forward :cpearce's earlier r+ after irc discussion.
Attachment #659884 -
Attachment is obsolete: true
Attachment #659972 -
Flags: review+
Assignee | ||
Comment 10•13 years ago
|
||
New try push https://tbpl.mozilla.org/?tree=Try&rev=af08711aceff
Updated•13 years ago
|
Attachment #659970 -
Flags: review?(cpearce) → review+
Assignee | ||
Comment 11•13 years ago
|
||
Push is green. Three known orange outside the media suite.
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Comment 12•13 years ago
|
||
(In reply to Ralph Giles (:rillian) from comment #10)
> New try push https://tbpl.mozilla.org/?tree=Try&rev=af08711aceff
Green on Try.
https://hg.mozilla.org/integration/mozilla-inbound/rev/7b86416037e1
https://hg.mozilla.org/integration/mozilla-inbound/rev/72e3b9a6615f
Flags: in-testsuite+
Keywords: checkin-needed
Comment 13•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7b86416037e1
https://hg.mozilla.org/mozilla-central/rev/72e3b9a6615f
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in
before you can comment on or make changes to this bug.
Description
•