Closed Bug 1354331 Opened 8 years ago Closed 8 years ago

Remove network.http.enablePerElementReferrer

Categories

(Core :: Networking: HTTP, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: francois, Assigned: swapneshks, Mentored)

Details

(Keywords: good-first-bug, Whiteboard: [necko-would-take])

Attachments

(1 file, 1 obsolete file)

That pref was used to gate the release of per-element referrer policies until the spec was changed to enable this delivery mechanism. The candidate recommendation of the Referrer Policy spec has it: https://www.w3.org/TR/referrer-policy/#referrer-policy-delivery-referrer-attribute and it has made its way into the HTML spec too: https://html.spec.whatwg.org/multipage/infrastructure.html#referrer-policy-attribute Given that we already have several prefs to trim the referrer (https://feeding.cloud.geek.nz/posts/tweaking-referrer-for-privacy-in-firefox/) and that we don't offer a toggle for document-level referrer policies, this per-element pref is not a meaningful user control mechanism.
Mentor: valentin.gosu
Keywords: good-first-bug
Whiteboard: [necko-would-take]
Hi.. I'm a beginner and would like to take up this bug. I'm still catching up to things...
Flags: needinfo?(francois)
(In reply to swapneshks from comment #1) > Hi.. I'm a beginner and would like to take up this bug. > I'm still catching up to things... Feel free to give it a go. You can start by searching for the name of the pref in https://searchfox.org/ to find out where it's defined and where it's used. From there, you'll get a feel for what needs to change in order to remove it entirely.
Flags: needinfo?(francois)
So I had a look at the usages and found that the pref is being declared at https://searchfox.org/mozilla-central/source/modules/libpref/init/all.js#1548 I tried commenting out the above line, but I am not sure how to check whether the action took any effect. Also, regarding the pref usages, I have the following doubts: 1. Let's pick https://searchfox.org/mozilla-central/source/browser/base/content/browser.js#5821. Do I have to remove only the referrer condition or the entire block? 2. After removal of the pref usage, how do I test whether it took effect?
Flags: needinfo?(francois)
So these are all the instances of the pref: https://searchfox.org/mozilla-central/search?q=network.http.enablePerElementReferrer&path= (In reply to Swapnesh Kumar Sahoo [:swapneshks] from comment #3) > 1. Let's pick > https://searchfox.org/mozilla-central/source/browser/base/content/browser. > js#5821. Do I have to remove only the referrer condition or the entire block? All instances of the pref would become true. So if (Services.prefs.getBoolPref("network.http.enablePerElementReferrer") && linkNode) { would become if (linkNode) { Also, in webidl files, [SetterThrows, Pref="network.http.enablePerElementReferrer"] becomes [SetterThrows] > 2. After removal of the pref usage, how do I test whether it took effect? I don't think there is much to check. Just make all the changes, submit the patch, and we'll make sure all the tests are still passing.
Assignee: nobody → swapneshks
Flags: needinfo?(francois)
Do let me know if I went wrong anywhere/further changes to be made.
Attachment #8863260 - Flags: review?(valentin.gosu)
Comment on attachment 8863260 [details] [diff] [review] Remove network.http.enablePerElementReferrer usages Review of attachment 8863260 [details] [diff] [review]: ----------------------------------------------------------------- You missed one instance at: http://searchfox.org/mozilla-central/source/browser/base/content/content.js#530
Attachment #8863260 - Flags: review?(valentin.gosu)
Patch with changes added for earlier missed instance.
Attachment #8863261 - Flags: review?(valentin.gosu)
Attachment #8863260 - Attachment is obsolete: true
Comment on attachment 8863261 [details] [diff] [review] Remove network.http.enablePerElementReferrer usages Review of attachment 8863261 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. Thank you for your contribution!
Attachment #8863261 - Flags: review?(valentin.gosu) → review+
(In reply to Valentin Gosu [:valentin] (Vacation until May 1st) from comment #10) > Comment on attachment 8863261 [details] [diff] [review] > Remove network.http.enablePerElementReferrer usages > > Review of attachment 8863261 [details] [diff] [review]: > ----------------------------------------------------------------- > > Looks good. Thank you for your contribution! My pleasure! This is my first accepted patch... Feels great!
WebIDL changes need DOM peer review before they can land.
Keywords: checkin-needed
Attachment #8863261 - Flags: review?(amarchesini)
Attachment #8863261 - Flags: review?(amarchesini) → review+
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/0041706d6e43 Remove network.http.enablePerElementReferrer usages. r=valentin r=baku
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: