473,387 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Need assistance reinventing the wheel.....

jim
I know it is stupid. I know browsers have this capability built in. I
know. I know. I know.

Still, is there a way to use javascript to enforce the same type of
cross-domain blocking that browsers implement, on pages from the same
server?

Let's say that I have several different pages on the same server - same
domain - but are authored by different people. I want to make sure that
one page cannot be used to see or manipulate another page on the same
server and domain - even if one page loads another in a frame.

Again, I know that this has been done in browsers for different domains.
My need is slightly different in that I want to prevent cross-page
scripting in the same domain on the same server without turning off
javascript completely.

Any help would be greatly appreciated.

jim
Oct 24 '08 #1
2 1012
On 2008-10-25 00:42, jim wrote:
Let's say that I have several different pages on the same server - same
domain - but are authored by different people. I want to make sure that
one page cannot be used to see or manipulate another page on the same
server and domain - even if one page loads another in a frame.
As far as I know, this isn't possible (unless you're using different
ports, or a different protocol). You can't use the browser to enforce
the separation, and a script that has total access to a document in
another frame can do whatever it wants there. Not even "private" values
in closures are safe.

You'll want to use different subdomains, at least. That will
automatically protect your scripts through the "same origin" policy in
(current) web browsers. Be careful how you set your cookies, though.
- Conrad
Oct 25 '08 #2
On Oct 24, 6:42 pm, jim <j...@home.netwrote:
I know it is stupid. I know browsers have this capability built in. I
know. I know. I know.

Still, is there a way to use javascript to enforce the same type of
cross-domain blocking that browsers implement, on pages from the same
server?
This is easily accomplished in an http handler for apache or IIS. If
it is possible at all with client side javascript, it would be a
kludge.

Bob
Oct 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: windandwaves | last post by:
Hi Folk I am an PHP novice. Right now, I am redeveloping the wheel by creating my own type of PHP MyAdmin tool for my clients so that they can manage some data. A good exercise, but probably...
45
by: Joh | last post by:
hello, i'm trying to understand how i could build following consecutive sets from a root one using generator : l = would like to produce : , , , ,
10
by: blah | last post by:
i m currently in a network (LAN). i started python because i heard that it has great ability for networking programs and/or scripts, but i m losing my motivation with python because there are sooo...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
34
by: Mark Kamoski | last post by:
Hi-- Please help. I need a code sample for bubble sort. Thank you. --Mark
2
by: Doug | last post by:
Not that I'd actually do this... but knowing the answer would give me a bit more understanding of the .NET Framework and the base class libraries - specifically how things work in relation to my...
1
by: Graham Smith | last post by:
Hi, I'd like to write a little bidirectional connector, which should sync data between two systems. Are there any components which I can use for this purpose, without reinvening the wheel? ...
16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
7
by: John Paul | last post by:
I'm thinking of building an e-commerce site in php. Anyone got any advice in building one? What is the best way to implement a payment system? Are any legal issues involved? Thanks,
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.