Closed Bug 1644802 Opened 4 years ago Closed 3 years ago

Right click copy image location inconsistent

Categories

(Core :: DOM: Core & HTML, defect, P3)

76 Branch
Desktop
All
defect

Tracking

()

RESOLVED DUPLICATE of bug 1719203

People

(Reporter: jerem.selier, Unassigned)

References

(Regression)

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

  1. Open new tab
  2. Load https://picsum.photos/
  3. Right click > Copy image Location

Actual results:

URL being paste is the URL after redirects: https://i.picsum.photos/id/949/536/354.jpg instead of before redirects: https://picsum.photos/536/354

Refreshing the page and trying again shows https://picsum.photos/536/354

Expected results:

It should be https://picsum.photos/536/354 from the start all the time and never past the redirected URL (eg it should always return the URL in the SRC attribute).

Component: Untriaged → DOM: Core & HTML
OS: Unspecified → All
Product: Firefox → Core
Regressed by: 1406253
Hardware: Unspecified → Desktop
Has Regression Range: --- → yes

Hmm, why is the expected result that? Both behaviors seem somewhat reasonable.

  1. Load https://picsum.photos/
  2. Right click > Copy image Location
    --- observe, clipboard shows https://i.picsum.photos/id/949/536/354.jpg
  3. Reload(F5)
  4. Right click > Copy image Location
    --- observe, clipboard shows https://picsum.photos/536/354

It is inconsistent results between step 2 and step4. Why?

Ah, I missed that... The inconsistent behavior does look a bit odd. I suspect it's related to the image being cached, but not being cacheable (which causes us to revalidate the load), vs. the first time on which we load the image completely.

In terms of expected behavior I just said this because:

  1. From my tests, all other browsers have this behavior
  2. It seems from a developer standpoint, I'd prefer to expose the URL in src and not wherever it might redirect. It could redirect to a URL that expires etc. It seems better and more logical to me to always expose the URL that was specified by the developer.

Up to you obviously.

Hi Edgar,
Could you please help to take a look? Thank you.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(echen)
Priority: -- → P3
See Also: → 1406253

Friendly ping, any chances this can be looked at?

I plan to take a look at, but have no time yet.
Per bug 1406253, it looks like using redirect URI in context menu is what we expect, and we should have consistent behavior on the image being cached.

See Also: → CVE-2021-43531
Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(echen)
Resolution: --- → DUPLICATE
See Also: 1406253
You need to log in before you can comment on or make changes to this bug.