#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)
Change History (18)
comment:1 Changed 17 years ago by
Keywords: | Confirmed added |
---|---|
Milestone: | → FCKeditor 2.6.1 |
Owner: | set to Wiktor Walc |
Priority: | Normal → High |
Changed 17 years ago by
Attachment: | 2115.patch added |
---|
comment:2 Changed 17 years ago by
Keywords: | Review? added |
---|
comment:3 Changed 17 years ago by
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 17 years ago by
Attachment: | 2115_3.patch added |
---|
comment:4 Changed 17 years ago by
Keywords: | Review? added; Review- removed |
---|
comment:5 Changed 17 years ago by
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 17 years ago by
Summary: | Ubuntu - Permission denied to get property Window.OnUploadCompleted → Permission 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 17 years ago by
Attachment: | 2115_4.patch added |
---|
comment:7 Changed 17 years ago by
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 17 years ago by
Keywords: | Review+ added; Review? removed |
---|
comment:9 follow-up: 12 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
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 17 years ago by
Keywords: | Review+ removed |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
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 17 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
@martinkou, please open a new ticket for this issue. This one has already been fixed, closed and released.
comment:12 follow-up: 13 Changed 16 years ago by
Component: | File Browser → Server : ASP.Net |
---|---|
Milestone: | FCKeditor 2.6.1 → FCKeditor 2.6.4 |
Resolution: | fixed |
Status: | closed → reopened |
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 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
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 16 years ago by
Component: | Server : ASP.Net → File Browser |
---|---|
Milestone: | FCKeditor 2.6.4 → FCKeditor 2.6.1 |
Comment: since we will call window.parent.OnUploadCompleted anyway, let's use it to test if we can access a parent property.