Open Bug 1575525 Opened 6 years ago Updated 2 years ago

Evaluate passing referrerInfo in Activity stream

Categories

(Firefox :: New Tab Page, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: tnguyen, Unassigned)

References

Details

From comment:
https://phabricator.services.mozilla.com/D39875#1254940

We likely can pass around referrerInfo in activity stream and could get the real original referrer from that object (we use "computed" referrer which could be omitted)

Depends on: 1567940

The "referrer" is used to open the download page and not to set as a http referrer. Perhaps it should just be renamed to avoid confusion?

https://searchfox.org/mozilla-central/rev/597a69c70a5cce6f42f159eb54ad1ef6745f5432/browser/components/newtab/content-src/lib/link-menu-options.js#147-154

Yes, that's true for Download. But there's still "referrer" in AS that I can not trace (sorry I don't know much about AS). For example https://searchfox.org/mozilla-central/rev/597a69c70a5cce6f42f159eb54ad1ef6745f5432/browser/components/newtab/data/content/activity-stream.bundle.js#13936

Yup, there are some actions that do result in link.referrer used as ReferrerInfo(UNSAFE_URL) when clicking a link or opening in a new window, etc.
https://searchfox.org/mozilla-central/rev/597a69c70a5cce6f42f159eb54ad1ef6745f5432/browser/components/newtab/lib/PlacesFeed.jsm#281-292

Downloads have a custom click behavior as well as custom context menu items:
https://searchfox.org/mozilla-central/rev/597a69c70a5cce6f42f159eb54ad1ef6745f5432/browser/components/newtab/lib/SectionsManager.jsm#162-170

It would be easy for someone to accidentally make a download use the referrer url as a http referrer if the link was passed in to the OPEN_LINK or OPEN_NEW_WINDOW related actions. That's why I was suggesting perhaps link.referrer should be renamed to something like link.downloadPage for the case of downloads.

Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.