Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#2115 closed Bug (fixed)

Permission denied to get property window.OnUploadCompleted

Reported by: Wiktor Walc Owned by: Wiktor Walc
Priority: Must have (possibly next milestone) Milestone: FCKeditor 2.6.1
Component: File Browser Version: FCKeditor 2.6
Keywords: Confirmed Cc:

Description

Source: http://www.fckeditor.net/forums/viewtopic.php?f=6&t=9242

I use FCkeditor 2.6Rc in Ubuntu FIrefox 2.0.0.13, when i upload a image file, i get error message in browser error console "Error: uncaught exception: Permission denied to get property Window.OnUploadCompleted",

but when checked the upload dir in my server, the image has been actually uploaded successfully.

Attachments (4)

2115.patch (3.4 KB) - added by Wiktor Walc 16 years ago.
2115_2.patch (3.9 KB) - added by Wiktor Walc 16 years ago.
Same as 2115, added whatsnew entry.
2115_3.patch (13.5 KB) - added by Wiktor Walc 16 years ago.
2115_4.patch (15.1 KB) - added by Wiktor Walc 16 years ago.

Download all attachments as: .zip

Change History (18)

comment:1 Changed 16 years ago by Wiktor Walc

Keywords: Confirmed added
Milestone: FCKeditor 2.6.1
Owner: set to Wiktor Walc
Priority: NormalHigh

Changed 16 years ago by Wiktor Walc

Attachment: 2115.patch added

comment:2 Changed 16 years ago by Wiktor Walc

Keywords: Review? added

Comment: since we will call window.parent.OnUploadCompleted anyway, let's use it to test if we can access a parent property.

Changed 16 years ago by Wiktor Walc

Attachment: 2115_2.patch added

Same as 2115, added whatsnew entry.

comment:3 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Keywords: Review- added; Review? removed

I haven't tested the patch, but I think that instead of keeping all that javascript, the code provided in [1799] should be used (I mean, a minimized version), and update that file to reflect the adjustment.

Changed 16 years ago by Wiktor Walc

Attachment: 2115_3.patch added

comment:4 Changed 16 years ago by Wiktor Walc

Keywords: Review? added; Review- removed

comment:5 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

The only fault for me is that it is checking for window.parent.OnUploadCompleted in _dev/domain_fix_template.js, which should be a quite generic code instead.

I think the original problem is that we were using window.top.opener... so maybe checking "window.parent.document.domain" should work in the same way as "window.parent.OnUploadCompleted", but without impacting on the code generality.

I'm reviewing- it just to check this approach, otherwise everything sounds good.

comment:6 Changed 16 years ago by Frederico Caldeira Knabben

Summary: Ubuntu - Permission denied to get property Window.OnUploadCompletedPermission denied to get property window.OnUploadCompleted

Removing "Ubuntu" from the subject, as it seems this one is impacting all browsers and installations as of FCKeditor 2.6.

Changed 16 years ago by Wiktor Walc

Attachment: 2115_4.patch added

comment:7 Changed 16 years ago by Wiktor Walc

Keywords: Review? added; Review- removed

The patched added above does the same thing as the previous one, but uses "window.parent.document.domain" in a loop to detect the correct domain.

There is another thing that is fixed in this patch. #1919 broke one thing. It seems that is impossible to use the standalone file browser, if we open it in the new window in Firefox (worked fine until 2.6 beta). Also the domain relaxation itself is broken in Firefox. To check this, simply open file browser:

http://dev.fckeditor.local/fckeditorsvn/editor/filemanager/browser/default/browser.html?Type=Image&Connector=/fckeditorsvn/editor/filemanager/connectors/php/connector.php

note that if you change the name of a domain from dev.fckeditor.net to localhost, it will start working.

Adding break in frmactualfolder.html, browser.html, common.js seems to solve problem introduced in #1919. Interesting that adding the same break in the catch block in server connectors is causing errors. I don't understand exatcly what's going on here, but with this patch everything seemed to work fine. I haven't tested it deeply yet, unfortunately.

comment:8 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:9 Changed 16 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: newclosed

I've committed the patch for the urgent 2.6.1 release to happen today.

Fixed with [2059]. Click here for more info about our SVN system.

comment:10 Changed 16 years ago by Martin Kou

Keywords: Review+ removed
Resolution: fixed
Status: closedreopened

Adding break in the catch blocks of frmactualfolder.html, browser.html and common.js actually disabled the domain relaxation logic in the three files. And it is causing permission denied errors when a file is being clicked in the file browser.

comment:11 Changed 16 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: reopenedclosed

@martinkou, please open a new ticket for this issue. This one has already been fixed, closed and released.

comment:12 in reply to:  9 ; Changed 16 years ago by mxm

Component: File BrowserServer : ASP.Net
Milestone: FCKeditor 2.6.1FCKeditor 2.6.4
Resolution: fixed
Status: closedreopened

Replying to fredck:

I've committed the patch for the urgent 2.6.1 release to happen today.

Fixed with [2059]. Click here for more info about our SVN system.

Please, change the line 118 in the FileWorkerBase.cs! It is aspx-connector and it should be like asp-connector:

			Response.Write( @"(function(){var d=document.domain;while (true){try{var A=window.parent.document.domain;break;}catch(e) {};d=d.replace(/.*?(?:\.|$)/,'');if (d.length==0) break;try{document.domain=d;}catch (e){break;}}})();" );

comment:13 in reply to:  12 Changed 15 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: reopenedclosed

Replying to mxm:

Please, change the line 118 in the FileWorkerBase.cs! It is aspx-connector and it should be like asp-connector:

Same thing here... please open a dedicated ticket for it, explaining the current problem and how to solve it.

comment:14 Changed 15 years ago by Frederico Caldeira Knabben

Component: Server : ASP.NetFile Browser
Milestone: FCKeditor 2.6.4FCKeditor 2.6.1
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