Closed Bug 1615897 Opened 5 years ago Closed 5 years ago

Blob URL should not ignore query or fragment

Categories

(Core :: DOM: File, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

References

Details

Attachments

(1 file)

There are a bunch of test failures at https://jgraham.github.io/wptdash/?bugComponent=core%3A%3Adom%3A+file, which are caused by us ignoring fragments and query parameters on blob: URLs. I think this could be fixed by modifying this code. The question is if that is going to cause other failures.

Do you have a try-push result to see what breaks? Maybe it breaks invalid tests.

Flags: needinfo?(evilpies)

Presumably removing the fragment is still correct; the only question is what should happen for the query part, right?

It seems like #fragment is supposed to be ignored when fetching, but not for URL.revokeObjectURL. So just changing that one place doesn't work.

Flags: needinfo?(evilpies)

One plausible thing we could do:

  1. Only strip fragment here, not query.
  2. Have an explicit check for fragment at the entrypoint of URL.revokeObjectURL and no-op if it's present (like we would for any non-matching URL).

I think that will generally give the right behavior, right?

Plus we'd want to make sure the specs make all this clear...

Just to be clear, I have not had a close look at the spec. Those two links are quite clear, yes, and not what we do.

Internally we have a bunch of other callsites into this code and it's not obvious to me whether they correspond to spec operations or not.

Tom, are you able to continue to work on this or should I triage to the team? Thanks

Flags: needinfo?(evilpies)
Priority: -- → P3

I can try implementing comment 5, but I can't promise that I will be able to dig into hundreds of failures when that doesn't work.

Assignee: nobody → evilpies
Flags: needinfo?(evilpies)
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/7aa8f1610d72 Blob URL should not ignore query parameter and revokeObjectURL additionally should not ignore fragments. r=baku
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Regressions: 1618442
Regressions: 1628862
Regressions: 1632644
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: