Closed Bug 156786 Opened 23 years ago Closed 23 years ago

Referrer not set when opening links in new window

Categories

(Core Graveyard :: Embedding: Mac, defect)

PowerPC
macOS
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.1beta

People

(Reporter: mikepinkerton, Assigned: ccarlen)

References

()

Details

(Keywords: topembed+)

Attachments

(2 files, 2 obsolete files)

- go to above page (caution, it's pr0n and may even disappear w/in a few days) - use context menu to open any of the thumbnails in a new window expected: image appears in new window actual: because the referrer is not set, the webserver redirects you to a "not found" page. this is the equiv of bug 156732, but for PPEmbed.
nominating topembed since this impacts websurfing and website revenue generation with sites that use the referrer trick.
*** Bug 156785 has been marked as a duplicate of this bug. ***
Got it.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.1beta
Dupe of bug 121084?
no, not a dupe.
giving this topembed+ to preempt someone finding it later and screaming. Every fix counts!
Keywords: topembedtopembed+
Blocks: 150046
Summary does not correctly identify the issue. Mozilla *does* send the referer information when opening a link in a new window or a new tab. This can be verified easily here: http://cgi.galion.lib.oh.us/ip-fork.htm Right-click the link and choose "New Window". Alternately, create a link to that script from any page anywhere, rinse, repeat. The referring page will be correctly identified by the script. (There is an exception; a file:/// address will NOT be sent, presumably for privacy reasons.) Reporter, please test the simplified testcase here: http://cgi.galion.lib.oh.us/ip-fork.htm WORKSFORME, Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a) Gecko/20020610 Otherwise, please explain what beyond the referer is causing the problem in question.
Jonadab - notice this is an _embedding_ bug, not a general Mozilla bug. It may work in Mozilla but PPEmbed, the Mac embedding test app, definitely has a problem.
Attached patch actual diff (don't look) (obsolete) — Splinter Review
Patch sets the referrer, cleans up the AE handling (gets rid of assertion about creating nsDependentCString with non-null-terminated string), and fixes allows opening in new window from an image link. Also, CBrowserApp.cp was de-tabbed.
Attached patch -w diff for review (obsolete) — Splinter Review
Same as other patch but with -w because of de-tabbed file. Need r=/sr=.
+ while (curr) + { + nsCOMPtr<nsIDOMElement> content = do_QueryInterface(curr); + if (!content) + break; + linkElement = do_QueryInterface(content); + if (linkElement) + break; Do you really need to QI twice? + CopyUCS2toASCII(temp, urlSpec); ... + if (NS_SUCCEEDED(rv)) + CopyUCS2toASCII(temp, referrer); Hrm, URLs should be utf-8. You could either sent Unicode in the Apple Events, or send UTF-8. Fix those, and sr=sfraser
Comment on attachment 92648 [details] [diff] [review] -w diff for review r=sdagley (what sfraser said)
Attachment #92648 - Flags: review+
Attachment #92647 - Attachment is obsolete: true
Attachment #92648 - Attachment is obsolete: true
New patch uses utf-8 rather than ASCII in the urls passed though nsACStrings and the AppleEvent. I didn't change the logic of that loop because I think 2 QIs are needed: the 1st just to see if the parent element is actually content and the 2nd to see if it's a link. This can happen is the image's immediate parent did not contain the href.
Comment on attachment 93178 [details] [diff] [review] v2 -w diff for review sr=sfraser
Attachment #93178 - Flags: superreview+
Comment on attachment 93178 [details] [diff] [review] v2 -w diff for review Forwarding sdagley's r= onto this one.
Attachment #93178 - Flags: review+
Comment on attachment 93178 [details] [diff] [review] v2 -w diff for review a=asa (on behalf of drivers) for checkin to 1.1 and 1.0.1
Attachment #93178 - Flags: approval+
Conrad, ADT canceled their late meeting today so I didn't get to lobby for approval but since it's critical for Tmumble please go ahead and check it in and I'll deal with ADT.
Fixed on branch.
Keywords: mozilla1.0.1fixed1.0.1
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
mdunn: pls verify this as fixed on the 1.0 branch, then replace the "fixed1.0.1" keyword, with "verified1.0.1". thanks!
to Dharma for verification
QA Contact: mdunn → dsirnapalli
No longer blocks: 150046
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: