My code is generating this type of error:
Security Error: Content at http://nonexistent.org/somepage.html
may not load data from about :blank.
The "about :blan k" page mentioned in the error message is a pop-up
window, whose content is 100% dynamically-generated, and which is
in fact *owes its existence* to code in the referring page
(nonexistent.or g/somepage.html), along the lines of something like
window.open("", "pop-up", "width=450,heig ht=300,resizabl e");
So, AFAICT, the error is spurious (i.e. there's really no security
breach). Is there any way to inform the browser that "about :blan k"
does belong to nonexistent.org ?
Thanks!
Karl
--
Sent from a spam-bucket account; I check it once in a blue moon. If
you still want to e-mail me, cut out the extension from my address,
and make the obvious substitutions on what's left. 4 2280
KKramsch wrote: My code is generating this type of error:
Security Error: Content at http://nonexistent.org/somepage.html may not load data from about:blank.
The "about:blan k" page mentioned in the error message is a pop-up window, whose content is 100% dynamically-generated, and which is in fact *owes its existence* to code in the referring page (nonexistent.or g/somepage.html), along the lines of something like
window.open("", "pop-up", "width=450,heig ht=300,resizabl e");
So, AFAICT, the error is spurious (i.e. there's really no security breach). Is there any way to inform the browser that "about:blan k" does belong to nonexistent.org ?
Thanks!
Karl
about :blank and any page loaded from your domain are indeed from
completely different domains, and should not be able to modify each
others' content.
Just use:
window.open("bl ank.htm" ...);
and in blank.htm:
<html>
<head>
<title>blank.ht m</title>
</head>
<body onload="if (opener && opener.callBack ) opener.callBack ();">
</body>
</html>
Now the document in the newly opened window has also originated from
your domain. Also, you now have a way to trigger a script in the opener
once you are sure the new document has completely loaded (and there is
in fact a document object in the new window to be manipulated).
--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq
In <40************ ***@agricoreuni ted.com> Grant Wagner <gw*****@agrico reunited.com> writes: KKramsch wrote:
My code is generating this type of error:
Security Error: Content at http://nonexistent.org/somepage.html may not load data from about:blank.
The "about:blan k" page mentioned in the error message is a pop-up window, whose content is 100% dynamically-generated, and which is in fact *owes its existence* to code in the referring page (nonexistent.or g/somepage.html), along the lines of something like
window.open("", "pop-up", "width=450,heig ht=300,resizabl e");
So, AFAICT, the error is spurious (i.e. there's really no security breach). Is there any way to inform the browser that "about:blan k" does belong to nonexistent.org ?
Thanks!
Karl
about:blank and any page loaded from your domain are indeed from completely different domains, and should not be able to modify each others' content.
Just use:
window.open("b lank.htm" ...);
and in blank.htm:
<html> <head> <title>blank.h tm</title> </head> <body onload="if (opener && opener.callBack ) opener.callBack ();"> </body> </html>
Hi! Thanks! But isn't there a way to do this without requiring
a dummy blank.htm file being physically on the disk?
Karl
--
Sent from a spam-bucket account; I check it once in a blue moon. If
you still want to e-mail me, cut out the extension from my address,
and make the obvious substitutions on what's left.
In <cd**********@r eader2.panix.co m> KKramsch <ka************ *******@yahooPE RIODcom.invalid > writes: In <40************ ***@agricoreuni ted.com> Grant Wagner <gw*****@agrico reunited.com> writes:
KKramsch wrote:
My code is generating this type of error:
Security Error: Content at http://nonexistent.org/somepage.html may not load data from about:blank.
The "about:blan k" page mentioned in the error message is a pop-up window, whose content is 100% dynamically-generated, and which is in fact *owes its existence* to code in the referring page (nonexistent.or g/somepage.html), along the lines of something like
window.open("", "pop-up", "width=450,heig ht=300,resizabl e");
So, AFAICT, the error is spurious (i.e. there's really no security breach). Is there any way to inform the browser that "about:blan k" does belong to nonexistent.org ?
Thanks!
Karl
about:blank and any page loaded from your domain are indeed from completely different domains, and should not be able to modify each others' content.
Just use:
window.open(" blank.htm" ...);
and in blank.htm:
<html> <head> <title>blank. htm</title> </head> <body onload="if (opener && opener.callBack ) opener.callBack ();"> </body> </html>
Hi! Thanks! But isn't there a way to do this without requiring a dummy blank.htm file being physically on the disk?
After my last post it occurred to me that it would be better to
post more code. The code in question belongs to a utilities
JavaScript "module" for use by all my CGI scripts; it includes the
following methods (error occurs in the console() method):
var Console;
function maybe_open_cons ole() {
if (!Console || Console.closed) {
Console = window.open("", "console","widt h=600,height=30 0,resizable");
}
try {
return Console.documen t && Console.documen t.open;
}
catch (ex) { return false; }
}
function console(msg) {
if (maybe_open_con sole()) {
var d = Console.documen t;
// The next line of code causes the security error
d.open("text/plain");
d.write(msg);
d.close();
}
}
The console() method is to be used for debugging purposes. It
pops up a window if necessary and writes a message to it. I have
indicated the line in it that causes the error.
Since I want this method to be usable by any CGI script, I'd like
to minimize dependencies on other files (such as a dummmy blank.htm
file somewhere below docroot).
Any suggestions on how to implement this would be much appreciated!
Karl
--
Sent from a spam-bucket account; I check it once in a blue moon. If
you still want to e-mail me, cut out the extension from my address,
and make the obvious substitutions on what's left.
KKramsch wrote: In <40************ ***@agricoreuni ted.com> Grant Wagner <gw*****@agrico reunited.com> writes:
about:blank and any page loaded from your domain are indeed from completely different domains, and should not be able to modify each others' content.
Just use:
window.open("b lank.htm" ...);
and in blank.htm:
<html> <head> <title>blank.h tm</title> </head> <body onload="if (opener && opener.callBack ) opener.callBack ();"> </body> </html>
Hi! Thanks! But isn't there a way to do this without requiring a dummy blank.htm file being physically on the disk?
<script type="text/javascript">
var Console;
function console(msg) {
var content = '<html>' +
'<head>' +
'<title>Console </title>' +
'</head>' +
'<body>' + '<pre>' +
msg +
'</pre>' + '</body>' +
'</html>';
if (!Console || Console.closed) {
Console = window.open(
"javascript :'" + content + "'",
"console",
"width=600,heig ht=300,resizabl e"
);
} else {
Console.documen t.open();
Console.documen t.write(content );
Console.documen t.close();
Console.focus() ;
}
}
</script>
<a href="#" onclick="consol e('hi there');return false;">Click this first</a>
<br>
<a href="#" onclick="consol e('already open');return false;">Click this second *before* closing
the console window</a>
Tested and working in: IE6SP1, Netscape 4.78, Firefox 0.9.2 and Mozilla 1.7.1
In Opera 7.52, you get:
Event thread: onclick
Error:
name: ReferenceError
message: Security error: attempted to read protected variable
on the second call to console(). Uncommenting the alert() reveals that Console is "object
inaccessible".
The fact that it works in Firefox and Mozilla tells me that either it's one of the following:
a) an overly zealous security model in Opera b) a bug in Opera c) a bug in the security model
of Gecko and what I'm doing really shouldn't be allowed.
I'm guessing (and hoping) it's a) or b).
It doesn't work at all in Opera 6.05.
--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ger |
last post by:
Hi,
I have a problem with a Windows Service that I have created accessing
System.Management.dll on a W2k3 environment. The Service runs fine on
an XP machine but the same Service causes an error once it tries to
access System.Management.Dll. The service is run using a Domain Admin
acoount.
The code is trying to set permissions for a file and looks like this:
|
by: Nathan Bloom |
last post by:
Hi,
I have a secured database that runs fine on the computer the database is
installed on. I have several workstations with access runtime installed
that also need access to the database. Access runtime runs fine when
accessing an unsecured version of the database. However once the database
was secured it generates a runtime error after asking for the user and
password and won't open. The shortcut to the secured database is:
"path...
|
by: Mohanasundaram |
last post by:
int i = 10;
int main()
{
int i = 20;
return 0;
}
Hi All,
I want to access the global variable i inside the main. Is there
|
by: raagzcd |
last post by:
Hi,
I have deployed an ASP.NET application on windows 2003 server.
It uses windows authentication .In the code i am using the following
code to identify the corpid
of the logged in user.
string user=User.Identity.Name.ToString();
I am storing the UserID and other credentials in session and using them
|
by: Dave |
last post by:
I am getting te following error in a ASP.Net app that is running on Win XP
Pro (SP2):
Server cannot access application directory 'C:\Documents and
Settings\dave\My Documents\My Visual Studio ASP.NET\MyWebSite\'. The
directory does not exist or is not accessible because of security settings.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information...
| |
by: Mike W |
last post by:
VB .NET 2003:
When I click on the Start button (>) in Visual Studio to run my project, I
get several messages in the Task List window. The first says:
C:\code\CaliberGenerator\Inherited Forms\frmDepartmentSummary.vb(278):
'frmDeptUpdate' is not a member of 'CaliberGenerator.frmMDIParent'.
However, in the frmMDIParent Class, at the beginning (just under "Public
Class frmMDIParent"), there is the line:
|
by: Mike W |
last post by:
VB .NET 2003:
When I click on the Start button (>) in Visual Studio to run my project, I
get several messages in the Task List window. The first says:
C:\code\CaliberGenerator\Inherited Forms\frmDepartmentSummary.vb(278):
'frmDeptUpdate' is not a member of 'CaliberGenerator.frmMDIParent'.
However, in the frmMDIParent Class, at the beginning (just under "Public
Class frmMDIParent"), there is the line:
|
by: Adrian |
last post by:
Hi
I'm trying to write an ActiveX replacement in VB.Net the following link was
my starting point.
http://www.vbdotnetheaven.com/Code/Jun2003/2067.asp
All was going well until I tried accessing a com object local on the PC (the
|
by: Richard MSL |
last post by:
I am having problems working with .net security. I have been attempting to
use the Microsoft .Net Framework 2.0 Configuration tool (version
2.0.50727.42), but it won't work for me. I have a simple test application
that works, when I run to Manage Applications - View Assembly Dependencies, I
get an error that says:
Unfortunately, the .NET Framework Configuration tool cannot show this list
of assembly dependencies for this application due...
|
by: cityzen.2000 |
last post by:
Hello all
I have a web page that has a bunch of links implemented in Javascript,
each of which calls back to the code-behind page via a
Webform_DoCallback call.
My problem is this:
When I am developing locally and using the local web server to debug,
the callbacks are working fine.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |