Opened 16 years ago

Closed 16 years ago

#2363 closed Bug (fixed)

IE7 Local Filesystem Permission Denied

Reported by: Samuel Smith Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: FCKeditor 2.6.3
Component: General Version: FCKeditor 2.6.2
Keywords: IE Review+ Cc: samuel_smith@…

Description

This error occurs when loading a document into the fckeditor when running the editor from the filesystem. I am noticing that this error only occurs with very large files. I have a 288 KB html file (which unfortunately I cannot share) that causes this error to appear. Smaller files open in the editor just fine however.

I am setting the text of this file using the function

function SetHTML(html) {

var oEditor = FCKeditorAPI.GetInstance('FCKeditor1'); oEditor.SetHTML(html, true);

};

where the html value passed in has the contents of the body of the page to be edited.

I cannot reproduce this error on the demo or on the latest demo. I tried to reproduce it by opening the source view, pasting in my code, and going back to the wysiwyg view.

I have isolated the problem (when it occurs for me) to the fckeditor/editor/_source/internals/fckdocumentprocessor.js file. Here are my changes to get it to work properly for me.

(starts around line 145)

return FCKTools.Merge( FCKDocumentProcessor.AppendNew(),

{

ProcessDocument : function( doc ) {

Firefox 3 would sometimes throw an unknown exception while accessing EMBEDs and OBJECTs without the setTimeout(). FCKTools.RunFunction( function()

{

/*

  • My Change: Removed because access to the doc is being denied in
  • IE7 when loaded from local filesystem * *

Process OBJECTs first, since EMBEDs can sometimes go inside OBJECTS (e.g. Flash). var aObjects = doc.getElementsByTagName( 'object' ); for ( var i = aObjects.length - 1 ; i >= 0 ; i-- )

processElement( aObjects[i] ) ;

Now process any EMBEDs left. var aEmbeds = doc.getElementsByTagName( 'embed' ) ; for ( var i = aEmbeds.length - 1 ; i >= 0 ; i-- )

processElement( aEmbeds[i] ) ;

*

  • End of my changes

*/

} ) ;

},

I just commented out the logic that was happening. For whatever reason access to the doc variable was denied. Trying to access any variable inside the doc variable causes a permission denied error.

Attachments (1)

2363.patch (2.3 KB) - added by Frederico Caldeira Knabben 16 years ago.

Download all attachments as: .zip

Change History (7)

Changed 16 years ago by Frederico Caldeira Knabben

Attachment: 2363.patch added

comment:1 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: HasPatch added

I was not able to reproduce this problem, but something similar has been already reported to me twice. All reports point to the same piece of code.

The code there states that the RunFunction function is used because of Firefox 3. So, the patch proposes to use it for Firefox only. Other browsers will call the code directly.

I've also refactored the code to avoid duplication.

@samuelms, can you confirm that this patch solves the problem to you?

comment:2 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review? added; HasPatch removed
Owner: set to Frederico Caldeira Knabben
Status: newassigned

It looks like the proposed patch is the real fix for it.

I'm asking for review. Even if not able to reproduce the problem, the reviewer should be focused on the syntax of the fix, as well as check any collateral issue that could come out because of it.

comment:3 Changed 16 years ago by Samuel Smith

Cc: samuel_smith@… added
Keywords: Review added; Review? removed
Resolution: fixed
Status: assignedclosed

I applied the patch and cannot duplicate the error. I opened the offending file (which always used to cause the error to come up) and no error appeared.

I will report if I notice any strange behavior, but the patch is working great for me.

I really appreciate how quickly bugs get fixed! :)

comment:4 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: IE Review? added; Review removed
Resolution: fixed
Status: closedreopened

@samuelms, thanks for the check. This is quite important for us as you are the reporter for this ticket.

But the patch must be also reviewed by a "reviewer" to then finally land our SVN trunk. Check out the Ticket Life Cycle page for more information.

comment:5 Changed 16 years ago by Martin Kou

Keywords: Review+ added; Review? removed

Looks ok to me.

comment:6 Changed 16 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: reopenedclosed

Fixed with [2247].

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