The default bug view has changed. See this FAQ.

about:permissions queries hosts for favicons

RESOLVED FIXED in Firefox 8

Status

()

Firefox
Preferences
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Stefan, Assigned: Margaret)

Tracking

Trunk
Firefox 8
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

6 years ago
User Agent:  
Build ID: 20110706164304

Steps to reproduce:

0. Use a profile which is use, not a fresh one.
1. Open new tab with web console (shift-ctrl-k)
2. about:permissions


Actual results:

Network access occurs. Fx tries to fetch some favicons


Expected results:

No network access occurs. Favicons shall be gathered only when a host is intentionally visited.
(Reporter)

Comment 1

6 years ago
It is certainly not "nice" if favicons are grabbed when the Permission Manager is entered (Bug 658615).
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Other → All

Comment 2

6 years ago
Reproduced:
Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20100101 Firefox/6.0
Mozilla/5.0 (X11; Linux x86_64; rv:7.0a2) Gecko/20110709 Firefox/7.0a2
Mozilla/5.0 (X11; Linux x86_64; rv:8.0a1) Gecko/20110709 Firefox/8.0a1
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 658615
Actually, this is asking for the *opposite* of Bug 658615.
Status: RESOLVED → REOPENED
Component: General → Preferences
QA Contact: general → preferences
Resolution: DUPLICATE → ---
(Assignee)

Updated

6 years ago
Blocks: 657961
(Assignee)

Comment 5

6 years ago
This seems to be a problem with the favicon service API. What we really want is an API method that just returns locally stored favicon data if we have it, and does not try to connect to the host otherwise. It looks like this method exists in nsIFaviconService, but not mozIAsyncFavicons, so perhaps we need to add a new async method to do this?

I'm cc'ing Marco, since he knows more about the favicon service.
(Assignee)

Updated

6 years ago
Blocks: 675945
can you just use a moz-anno:favicon:pageurl src for the icon?
(Assignee)

Comment 7

6 years ago
Created attachment 550154 [details] [diff] [review]
patch

(In reply to comment #6)
> can you just use a moz-anno:favicon:pageurl src for the icon?

I wasn't aware that this was a way to get what I wanted. With this patch I'm not seeing any more network activity, but I'm still seeing favicons, so it solves the problem!
Assignee: nobody → margaret.leibovic
Status: REOPENED → ASSIGNED
Attachment #550154 - Flags: review?(mak77)
Comment on attachment 550154 [details] [diff] [review]
patch

Review of attachment 550154 [details] [diff] [review]:
-----------------------------------------------------------------

per IRC discussion, this is fine, but adds 2 queries.  You should fire the https request before the http one, and ignore an eventual second callback if both exist.

::: browser/components/preferences/aboutPermissions.js
@@ +94,5 @@
>    getFavicon: function Site_getFavicon(aCallback) {
>      function faviconDataCallback(aURI, aDataLen, aData, aMimeType) {
>        try {
> +        // Avoid making a network connection to fetch the favicon
> +        aCallback("moz-anno:favicon:" + aURI.spec);

you can use gFaviconService.getFaviconLinkForIcon(aURI) to get automatically a moz-anno:favicon nsIURI (it just does the string concat practically)

@@ +102,5 @@
>      }
>  
>      // Try to find favicion for both URIs. Callback will only be called if a
>      // favicon URI is found, so this means we'll always prefer the https favicon.
>      gFaviconService.getFaviconURLForPage(this.httpURI, faviconDataCallback);

gFaviconService should also be QI to Ci.mozIAsyncFavicons (you can .getService().QueryInterface() to get both)
Attachment #550154 - Flags: review?(mak77) → feedback+
nevermind QI, it's not needed, gavin pointed out we implement classinfo there, I honestly didn't recall :(
(Assignee)

Comment 10

6 years ago
Created attachment 550186 [details] [diff] [review]
patch v2
Attachment #550154 - Attachment is obsolete: true
Attachment #550186 - Flags: review?(mak77)
Comment on attachment 550186 [details] [diff] [review]
patch v2

Review of attachment 550186 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/components/preferences/aboutPermissions.js
@@ +102,2 @@
>        try {
> +        // Get favicon data instead of fetching the favicon over the network.

nit: this comment looks a bit ambiguous, may get some love.
Attachment #550186 - Flags: review?(mak77) → review+
(Assignee)

Comment 12

6 years ago
http://hg.mozilla.org/integration/fx-team/rev/7a907ffaa45b
Whiteboard: [fixed-in-fx-team]
http://hg.mozilla.org/mozilla-central/rev/7a907ffaa45b
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 8

Comment 14

6 years ago
verified fixed Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
You need to log in before you can comment on or make changes to this bug.