Closed Bug 109360 Opened 23 years ago Closed 23 years ago

Image Blocking should block server of image, not server of page

Categories

(Core :: Graphics: Image Blocking, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla0.9.9

People

(Reporter: CatamountJack, Assigned: morse)

References

()

Details

Attachments

(1 file)

Load a page with banner ads... I noticed this with www.wunderground.com and www.smartmoney.com but I'm sure it would work on most any page. Right click on an ad on the page and "Block Images from this Server" Expected Result: You would think (or at least I do) that the server of the image (whaterver the SRC of the image is) that you clicked on would be blocked. Actual Result: Go to Preferences|Privacy & Security|Images|View Image Permissions and the server that is blocked is for the content of the page you are viewing, not the server of the image itself. Why would I want to block all of the page's content, it is the ad I want to get rid of. Or am I missing the concept of image blocking?
->morse
Assignee: pavlov → morse
Component: ImageLib → Cookies
QA Contact: tpreston → tever
Can you be more specific in your example. Which image did you click on and who is the server of that image?
[Build-ID: 2001-11-10-15 on Linux] I've also seen this on many pages lately. Steps to reproduce: 1) Go to http://www.dn.se 2) Right-click on the top banner and choose "Block images from this server". 3) Go to Tasks->Privacy & Security->Image Manager->View sites that can/cannot..." Result: The site www.dn.se is listed as blocked. Expected result: The site that holds the image (ads.adhostcenter.com in this case) should be blocked.
OK, I can reproduc it. Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.9
By the way, this happens on every URL that I have tried so far, so I'm pretty sure that this feature is broken all together.
I've narrowed it down: 2001-10-16-08 OK 2001-10-17-08 BROKEN I'm pretty sure that morse@netscape.com checkin for bug 97409 broke this. Here's his checkin was made 10/16/2001 13:37 with the comment: "bug 97409, add unblocking images to context menu" I'm guessing this part of the patch fucked it up: - var imgmanager = - Components.classes["@mozilla.org/imgmanager;1"] - .getService().QueryInterface(Components.interfaces.nsIImgManager); - imgmanager.block(gContextMenu.imageURL); + var permissionmanager = + Components.classes["@mozilla.org/permissionmanager;1"] + .getService(Components.interfaces.nsIPermissionManager); + if (!permissionmanager) { + return; + } + permissionmanager.add(window._content.location, false, IMAGEPERMISSION); + }, Therefore I'm adding morse to CC.
You are right. Don't know what I was thinking when I made that change. Attaching revised patch that gets the url from gContextMenu.imageURL which is the way it was originally.
dahlqvist, please review. cc'ing alecf for sr.
This was the fix I was thinking of. I also applied the patch and it works as expected again. (From update of attachment 57412 [details] [diff] [review]) r=andre
OS: Windows 2000 → All
Comment on attachment 57412 [details] [diff] [review] get url from gContextMenu.imageURL sr=alecf
Attachment #57412 - Flags: superreview+
Any chance of this making it into 0.9.6?
I'll be checking this into the trunk just as soon as it opens today. I don't think it's that important that we want to get drivers approval to put this in on the branch, but if you think it's important, then feel free to do so.
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Fix is now checked in on 0.9.6 branch as well.
*** Bug 107095 has been marked as a duplicate of this bug. ***
Component: Cookies → Image Blocking
QA Contact: tever → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: