Open Bug 1532646 Opened 6 years ago Updated 9 months ago

Produce the algorithm that determines whether something is a media resource

Categories

(Core :: Audio/Video, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: annevk, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [orb:m2])

In order to prevent non-media "no-cors" cross-origin content from entering the content process it would be good to know what logic we use today to determine whether a resource is allowed to be played.

My suspicion is that this is a combination of Content-Type parsing and sniffing some initial set of bytes of the response.

If we feed a response into some subsystem without any kind of validation it would be good to know whether the subsystem performs validation and what that might be.

I'm further assuming that range responses cannot be made without first confirming the type of the resource somehow.

(To be clear, this is only about audio/video elements as those are the only contexts that can fetch and render responses that are otherwise opaque to the page; i.e., "no-cors" cross-origin requests that result in opaque responses.)

Priority: -- → P3
Whiteboard: [orb:m1]
Whiteboard: [orb:m1] → [orb:m2]
Severity: normal → S3
Whiteboard: [orb:m2] → [orb:m2][sp3]
Whiteboard: [orb:m2][sp3] → [orb:m2]

Paul, I did a comparison between our implementation and the spec https://mimesniff.spec.whatwg.org/#audio-or-video-type-pattern-matching-algorithm. I see a few patterns that we check, but the spec doesn't, like fLaC, M4V, M4A, and M4P. I guess there are probably reasons for them to be not included in the spec, so I think we likely don't need to do anything changes to the spec.

Do you mind confirm this?

Flags: needinfo?(padenot)

No reasons that I know of, except that we simply haven't written the patches to the spec.

Flags: needinfo?(padenot)
You need to log in before you can comment on or make changes to this bug.