Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#10397 closed Bug (duplicate)

Bug when document.domain touched but not changed

Reported by: Taha Jahangir Owned by:
Priority: Normal Milestone:
Component: General Version: 4.1.1
Keywords: Oracle Cc: senthil.kumaran@…

Description

This simple test completely fails in IE and has a JS error on Firefox. (CKEditor 4.1.1)

I tested with IE8, but I think it exists in all versions of IE. (The editor is not editable at all)

The error (in IE) says:

Access is Denied.
http://.../.../ckeditor/plugins/wysiwygarea/plugin.js - line 98 - char 6
<!DOCTYPE html>
<html><head>
	<script type="text/javascript" src="../ckeditor.js"></script>
</head><body>
	<textarea id="editor1">CKEditor!</textarea>
	<script>
		document.domain = document.domain;
		CKEDITOR.replace( 'editor1' );
	</script>
</body></html>

In Firefox (20), a JS occurs, but editor is editable and functional:

Error: Permission denied to access property 'setTimeout'
  ---   return ownerWindow.setTimeout( function() {
  tools.js (line 423)

It seems, this is because CKEDITOR.env.isCustomDomain() is incorrectly returns False when document.domain is touched but not changed.

Note, that touching document.domains is necessary when a page wants to interact with an iframe of it's subdomains.

Change History (4)

comment:1 Changed 11 years ago by Taha Jahangir

related to #10165

comment:2 Changed 11 years ago by Piotrek Koszuliński

Resolution: duplicate
Status: newclosed

As @a.nowodzinski wrote there:

IE distinguishes between document.domain changed manually and automatic value (even it they're equal like: document.domain = document.domain).

IE distinguishes, but we can't in other way than a global, explicit setting like one proposed in #10165.

Anyway, this is a dup of #10165, so I'm closing it.

comment:3 Changed 11 years ago by Senthil

Cc: senthil.kumaran@… added
Keywords: Oracle added

comment:4 Changed 11 years ago by Piotrek Koszuliński

This ticket is closed in favour of #10165 (which you already watch) so there's no reason to be CCed here. We've prepared a prototype of a patch for this issue in #10165, but we haven't got any confirmation from you that it works. Could you verify it, so we'll be able to work on it further and finally fix this issue on master?

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy