Ticket #9073 (confirmed Bug)

Opened 22 months ago

Last modified 22 months ago

ImageUpload callback can not be called cross-domain.

Reported by: Enzo90910 Owned by:
Priority: Normal Milestone:
Component: File Browser Version: 3.0
Keywords: Cc:

Description

When using filebrowserImageUploadUrl, CKEditor creates an iframe and loads the given filebrowserImageUploadUrl as the source for the iframe. It is my understanding that the HTML loaded in the iFrame is then supposed to execute a Javascript looking like this:

window.parent.CKEDITOR.tools.callFunction(CKEditorFuncNum, uploadedImageUrl, sucessMessage);

The problem is that when filebrowserImageUploadUrl is not on the same domain as the originalPage, browsers absolutely refuse the javascript to access window.parent.CKEDITOR, and the callback is never called back. If I analyzed the problem correclty, this could probably be made to work by creating a <script> tag instead of an <iframe>, in which case there is no cross-domain problem.

Change History

comment:1 Changed 22 months ago by j.swiderski

  • Status changed from new to confirmed
  • Version set to 3.0
  • Component changed from General to File Browser

We are aware of this problem but this will be done with window.postMessage (E.g. https://developer.mozilla.org/en/DOM/window.postMessage) and not with scripts.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy