473,396 Members | 1,738 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,396 software developers and data experts.

Security violation foreign domain?

Hello,

I have been using Javascript to access some audio files from another
server and there has been no associated problem with IE or FF but
Opera gave an error message which led me to read that accessing files
from a "foreign" domain name is a security violation for Javascript.

This true? If yes, why do all above browsers allow it to happen?!

The reason for putting the audio files on another server was to cope
with a possible heavy demand brought about by a radio mention of this
site.

Any workaround?

Any thoughts?

Cheers

Geoff
Jun 27 '08 #1
8 3053
On May 8, 3:55*am, Geoff Cox <g...@freeuk.notcomwrote:
Hello,

I have been using Javascript to access some audio files from another
server and there has been no associated problem with IE or FF but
Opera gave an error message which led me to read that accessing files
from a "foreign" domain name is a security violation for Javascript.

This true? If yes, why do all above browsers allow it to happen?!

The reason for putting the audio files on another server was to cope
with a possible heavy demand brought about by a radio mention of this
site.

Any workaround?

Any thoughts?

Cheers

Geoff
How exactly do you "access" these files?
Jun 27 '08 #2
Geoff Cox <gc**@freeuk.notcomwrites:
Hello,

I have been using Javascript to access some audio files from another
server and there has been no associated problem with IE or FF but
Opera gave an error message which led me to read that accessing files
from a "foreign" domain name is a security violation for Javascript.

This true? If yes, why do all above browsers allow it to happen?!
Those questions can only be answered if you explain how your code
works. Javascript/browsers don't usually have built-in "access some
audio files" methods.
The reason for putting the audio files on another server was to cope
with a possible heavy demand brought about by a radio mention of this
site.

Any workaround?
Probably, yeah.
Any thoughts?
Use flash instead? (I'm only half kidding).

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
Jun 27 '08 #3
On Thu, 08 May 2008 14:34:26 +0200, Joost Diepenmaat <jo***@zeekat.nl>
wrote:
>Geoff Cox <gc**@freeuk.notcomwrites:
>Hello,

I have been using Javascript to access some audio files from another
server and there has been no associated problem with IE or FF but
Opera gave an error message which led me to read that accessing files
from a "foreign" domain name is a security violation for Javascript.

This true? If yes, why do all above browsers allow it to happen?!

Those questions can only be answered if you explain how your code
works. Javascript/browsers don't usually have built-in "access some
audio files" methods.
Joost,

I am using soundmanager2

http://www.schillmania.com/content/p...soundmanager2/

the audio files are accessed using an http link such as

soundManager.createSound({
id:'mySound'+t,
url:'http://www.differentsite.com/audio/Track' + (+t+35) + '.mp3',
onfinish:function(){document.getElementById('test' +t+1).className =
'visibleDiv2'} });
soundManager.play('mySound'+t);
count++;
}

Cheers

Geoff

>
>The reason for putting the audio files on another server was to cope
with a possible heavy demand brought about by a radio mention of this
site.

Any workaround?

Probably, yeah.
>Any thoughts?

Use flash instead? (I'm only half kidding).
Jun 27 '08 #4
On Thu, 8 May 2008 04:43:10 -0700 (PDT), Tom Cole <tc****@gmail.com>
wrote:
>On May 8, 3:55*am, Geoff Cox <g...@freeuk.notcomwrote:
>Hello,

I have been using Javascript to access some audio files from another
server and there has been no associated problem with IE or FF but
Opera gave an error message which led me to read that accessing files
from a "foreign" domain name is a security violation for Javascript.

This true? If yes, why do all above browsers allow it to happen?!

The reason for putting the audio files on another server was to cope
with a possible heavy demand brought about by a radio mention of this
site.

Any workaround?

Any thoughts?

Cheers

Geoff

How exactly do you "access" these files?
Tom,

please see my reply to Joost's email.

Cheers

geoff
Jun 27 '08 #5
On May 8, 9:38*am, Geoff Cox <g...@freeuk.notcomwrote:
On Thu, 8 May 2008 04:43:10 -0700 (PDT), Tom Cole <tco...@gmail.com>
wrote:


On May 8, 3:55*am, Geoff Cox <g...@freeuk.notcomwrote:
Hello,
I have been using Javascript to access some audio files from another
server and there has been no associated problem with IE or FF but
Opera gave an error message which led me to read that accessing files
from a "foreign" domain name is a security violation for Javascript.
This true? If yes, why do all above browsers allow it to happen?!
The reason for putting the audio files on another server was to cope
with a possible heavy demand brought about by a radio mention of this
site.
Any workaround?
Any thoughts?
Cheers
Geoff
How exactly do you "access" these files?

Tom,

please see my reply to Joost's email.

Cheers

geoff- Hide quoted text -

- Show quoted text -
That sounds like it really shouldn't be any different than creating an
img that points to some resource on another server. That is totally
legit and shouldn't really raise any concerns. I'm surprised that
Opera does.

If accessing files from another domain was restricted, there wouldn't
be much use for the internet really :).

The problem comes into play when you try to make an XMLHttpRequest to
another domain or access the DOM of a page provided from another
domain. That does not appear to be the issue here. So I wouldn't be
concerned.
Jun 27 '08 #6
VK
On May 8, 5:38 pm, Geoff Cox <g...@freeuk.notcomwrote:
I am using soundmanager2

http://www.schillmania.com/content/p...soundmanager2/

the audio files are accessed using an http link such as

soundManager.createSound({
id:'mySound'+t,
url:'http://www.differentsite.com/audio/Track'+ (+t+35) + '.mp3',
onfinish:function(){document.getElementById('test' +t+1).className =
'visibleDiv2'} });
soundManager.play('mySound'+t);
count++;

}
That doesn't help too much as it is just the top level wrapper for the
underlaying code. From a quick look soundmanager2 simply creates
OBJECTs for Flash movies and later trying to interact with them using
Javascript on the page. ActionScript (ECMAScript implementation used
in Flash) has its own security model that doesn't coerce with the
browser security model in many details. This way the
ActionScript<>Javascript interaction is normally disabled or limited
on current browsers so to keep both models by their own.
Jun 27 '08 #7
On Thu, 8 May 2008 14:11:44 -0700 (PDT), VK <sc**********@yahoo.com>
wrote:
>On May 8, 5:38 pm, Geoff Cox <g...@freeuk.notcomwrote:
>I am using soundmanager2

http://www.schillmania.com/content/p...soundmanager2/

the audio files are accessed using an http link such as

soundManager.createSound({
id:'mySound'+t,
url:'http://www.differentsite.com/audio/Track'+ (+t+35) + '.mp3',
onfinish:function(){document.getElementById('test '+t+1).className =
'visibleDiv2'} });
soundManager.play('mySound'+t);
count++;

}

That doesn't help too much as it is just the top level wrapper for the
underlaying code. From a quick look soundmanager2 simply creates
OBJECTs for Flash movies and later trying to interact with them using
Javascript on the page. ActionScript (ECMAScript implementation used
in Flash) has its own security model that doesn't coerce with the
browser security model in many details. This way the
ActionScript<>Javascript interaction is normally disabled or limited
on current browsers so to keep both models by their own.
VK,

I'm not sure that I totally follow you - is taking the mp3 files from
the other server a problem or not?!

IE and FF do not complain (ie no error messages) and play the files.
Opera complains but plays them...

I am concerned that other users of IE and FF may have a different
experience from mine and might not be able to play the sounds?!

Cheers

GTeoff
Jun 27 '08 #8
On Thu, 8 May 2008 13:42:22 -0700 (PDT), Tom Cole <tc****@gmail.com>
wrote:
>>
please see my reply to Joost's email.

Cheers

geoff- Hide quoted text -

- Show quoted text -

That sounds like it really shouldn't be any different than creating an
img that points to some resource on another server. That is totally
legit and shouldn't really raise any concerns. I'm surprised that
Opera does.

If accessing files from another domain was restricted, there wouldn't
be much use for the internet really :).

The problem comes into play when you try to make an XMLHttpRequest to
another domain or access the DOM of a page provided from another
domain. That does not appear to be the issue here. So I wouldn't be
concerned.
Tom,

Thanks - that's reassuring!

Cheers

Geoff
Jun 27 '08 #9

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

Similar topics

0
by: Dirk Hagemann | last post by:
Hi! I'm trying to get the PDC-Computername of a foreign WinNT-domain, but I only managed to get the PDC of my own domain with this code: pdc=win32net.NetGetAnyDCName() I think it should be...
1
by: Dom Leonard | last post by:
Hi all, I occasionally use the javascript protocol in window.open to retrieve a window property of the opener for use as HTML source: window.htmlSrc="<html>...blah ....<\/html>";...
2
by: Erwin S. Andreasen | last post by:
Hi, I have a web application where window A opens window B (same site). B later wants to do something depending on whether the window A, window.opener.document.domain, has changed. However,...
2
by: Razzbar | last post by:
I found an interesting JS technique being used by spurl.net and a few other sites, and implemented my own version of it. I like using it, but I'm rather surprised it works at all. One of my old...
116
by: Mike MacSween | last post by:
S**t for brains strikes again! Why did I do that? When I met the clients and at some point they vaguely asked whether eventually would it be possible to have some people who could read the data...
1
by: Jean-Yves | last post by:
Hi. I have a weird problem when I update my database. I am using SQL Server 2000. In my VB.NET application I used Web Services for insert, update, delete. I have a relation between 2 tables in my...
9
by: jahearn | last post by:
This are really questions about xsite scripting security. I'm trying to do a couple things using Firefox browser: 1. Need to detect any mouse click in a frame loaded with a page from an unknown...
5
by: Axel Gallus | last post by:
In IE , there is a setting in EXTRAS->OPTIONS->SECURITY->INTERNET->CUSTOM SETTINGS->SCRIPTING-> ALLOW ACCESS ACROSS DOMAIN BOUNDARIES Does this really affect the Sandbox, respectively "same origin...
2
by: rorajoey | last post by:
Violation of UNIQUE KEY constraint 'IX_surveyQuestions'. Cannot insert duplicate key in object 'dbo.surveyQuestions'. This might seem like a simple matter of trying to insert a row with ID=20 when...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.