Subdomain Ajax script denied access to primary domain

T

totalstranger

Using an AJAX Javascript function that works fine if it's in the primary
domain www.arnb.org, but suffers from a security error when attempted
from a subdomain, thepatsyreport.arnb.org

In the subdomain HTML I have a base statement, and set document.domain
to 'arnb.org' with Javascript
<base href="http://www.arnb.org" />

Anyone know how to get around this issue or tell me what I'm doing that
is wrong?

Name of test page:
http://thepatsyreport.arnb.org/indexx.php
The error can be created by clicking on the find icon after a band name.
(Looks like a magnifying glass)

Errors from Firefox console.(original directory name changed to
xxxxxxxxxx) As expected this also fails in IE7, Safari, and Opera

Security Error: Content at http://thepatsyreport.arnb.org/indexx.php may
not load data from
http://www.arnb.org/xxxxxxxxxx/External4.php?B=144&Pfx=&UTF8&1219330078689.

Error: uncaught exception: [Exception... "Access to restricted URI
denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"
location: "http://www.arnb.org/xxxxxxxxxx/External.js Line: 35"]


Thank you
Arn
 
T

Thomas 'PointedEars' Lahn

totalstranger said:
Using an AJAX Javascript function that works fine if it's in the primary
domain www.arnb.org, but suffers from a security error when attempted
from a subdomain, thepatsyreport.arnb.org

Works as designed. RTFM said:
In the subdomain HTML I have a base statement, and set document.domain
to 'arnb.org' with Javascript
<base href="http://www.arnb.org" />

This is either a borken HTML fragment, or an XHTML fragment. It is
certainly not "Javascript", whatever you imagine that to be.
Anyone know how to get around this issue

You cannot, short of compromising your system's security.
or tell me what I'm doing that is wrong?

Posting like a luser.

<http://catb.org/~esr/faqs/smart-questions.html>


PointedEars
 
T

totalstranger

This is either a borken HTML fragment, or an XHTML fragment. It is
certainly not "Javascript", whatever you imagine that to be.

The base statement is not javascript a-hole, anyone proficient with HTML
would know that.
You cannot, short of compromising your system's security.

That's what document.domain is supposed to get around, however is
appears after additional reading it only works with Iframes.
Posting like a luser.

Learn to spell you schmuck.

The problem with posting on groups like this is the a-hole/loosers who
choose to attack and diminish people who ask questions the
a-hole/loosers don't appreciate or feel they are above responding to in
a respectful manner.

Get a life.

You are officially plonked here, turd-blossom.
 
T

Thomas 'PointedEars' Lahn

totalstranger said:
[...] Thomas 'PointedEars' Lahn said:
totalstranger said:
Using an AJAX Javascript function that works fine if it's in the primary
domain www.arnb.org, but suffers from a security error when attempted
from a subdomain, thepatsyreport.arnb.org
Works as designed. RTFM said:
In the subdomain HTML I have a base statement, and set document.domain
to 'arnb.org' with Javascript
<base href="http://www.arnb.org" />
This is either a borken HTML fragment, or an XHTML fragment. It is
certainly not "Javascript", whatever you imagine that to be.

The base statement is not javascript a-hole, anyone proficient with HTML
would know that.

The `base' element is not a statement, as (X)HTML is a markup language and
not a programming language. Anyone with a minimum clue about (X)HTML would
know that.
[...]
You are officially plonked here, turd-blossom.

YMMD.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top