Closed Bug 109319 Opened 23 years ago Closed 23 years ago

window.location.href missing Referer

Categories

(Core :: DOM: Core & HTML, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9.7

People

(Reporter: mozilla, Assigned: bzbarsky)

References

()

Details

Attachments

(3 files, 1 obsolete file)

If you try the script I setup on the url you will see that if you click on the text (normal anchor) it will display the referer. if you click on the rest of the table the referer isn't included. Here's the syntax I used: onClick="JavaScript.window.location.href='<url>';" This will make statistic for a site, script etc think it didn't come from a link. That's bad ;)
Over to DOM0
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: Javascript Engine → DOM Level 0
Ever confirmed: true
OS: Linux → All
QA Contact: pschwartau → amar
Hardware: PC → All
Attached patch Patch to set referrer correctly (obsolete) — Splinter Review
jst, would you review?
Assignee: jst → bzbarsky
Keywords: patch, review
Priority: -- → P3
Target Milestone: --- → mozilla0.9.7
Shouldn't the referer be the caller's URI and not the current URI (which happen to be the same in this case)? I.e. if you have frame_a and frame_b, and frame_a set's frame_b's location the referer should be frame_a's URI, not frame_b's, no? What does IE and 4.x do in such a case?
Comment on attachment 57252 [details] [diff] [review] Patch to set referrer correctly Yup. NS4 makes referrer be the caller's URI
Attachment #57252 - Attachment is obsolete: true
Attached file driver frame
Attached file frameset testcase
Attached patch Better patchSplinter Review
Status: NEW → ASSIGNED
Priority: P3 → P1
Looks like LocationImpl::GetSourceDocument() and LocationImpl::GetSourceBaseURL() can return w/o ever setting the out parameters to null. sr=jst with that fixed.
Attachment #57285 - Flags: superreview+
Comment on attachment 57285 [details] [diff] [review] Better patch r=fabian after bz's explanation
Attachment #57285 - Flags: review+
checked in.
.... and marking fixed, too. :)
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified fixed on trunk build ID : 2001112003
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: