Ticket #3905 (closed Bug: fixed)

Opened 9 months ago

Last modified 2 weeks ago

Editor causes unauthenticated content warnings over SSL in FF 3.5

Reported by: jonathanc Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.1
Component: General Version: 3.0.2
Keywords: Confirmed Review+ Cc: fckeditor@…

Description

Firefox 3.5 is showing an unauthenticated content warning icon on https pages with editors. Such warnings look unprofessional and tend to scare users away.

The offending code is in ckeditor.js:

document.write(

'<script type="text/javascript" src="' + CKEDITOR.getUrl( '_source/core/loader.js' ) + '"></script>' );

Attachments

unauthenticated content.jpg Download (0.8 KB) - added by jonathanc 9 months ago.
3905.patch Download (5.1 KB) - added by tobiasz.cudnik 8 months ago.
3905_2.patch Download (5.3 KB) - added by tobiasz.cudnik 7 months ago.
3905_3.patch Download (4.8 KB) - added by garry.yao 4 months ago.

Change History

Changed 9 months ago by jonathanc

Changed 9 months ago by fredck

  • milestone set to CKEditor 3.0

Changed 9 months ago by tobiasz.cudnik

  • owner set to tobiasz.cudnik
  • status changed from new to assigned

Changed 9 months ago by tobiasz.cudnik

  • keywords Confirmed added

Problem exists in wysiwyg area plugin, which fills iframe using document.write & document.close. This causes FF to report unauthenticated content notice.

This seems very relevant to  this gecko bug.

As for now i don't have idea how to deal with this. I'm testing different approaches to replace document.write.

Changed 8 months ago by tobiasz.cudnik

  • keywords Review? added

Patch binds WYSIWYG area creation to iframe's onload. Works for all browser without workaround for FF and Opera. Custom domain is supported, but needs to be set 2 times.

Changed 8 months ago by tobiasz.cudnik

Changed 8 months ago by fredck

  • keywords Review- added; Review? removed
  • milestone changed from CKEditor 3.0 to CKEditor 3.1

This approach would be good for several reasons. The most important thing is that we would not need to use a "bridge" to send the data to the iframe to be written, which makes the code much clearer.

Some things to be considered in the patch:

  • The "CKEDITOR._[ 'cke_htmlToLoad_' + editor.name ]" trick is not anymore needed. We can pass "data" directly to the createIFrame function at line 507.
  • The "onLoad" variable is not needed. The function can be passed directly to the on() call, and it's enough to call e.removeListener() to remove it at line 245.
  • The isCustomDomain variable has been removed from line 220, but isCustomDomain() is called twice in the patch, so it makes sense leaving that line intact and simply used the variable.

In any case, these changes are too risky to be done at this stage. We can work on it as soon as we release the 3.0.

Changed 8 months ago by highjinx_53

  • cc fckeditor@… added

Changed 7 months ago by tobiasz.cudnik

I've implemented listed points and updated patch against newest trunk.

Bad news is that this doesn't seem to resolve unencrypted content notice on newest FF 3.5 (both win and linux).

Changed 7 months ago by tobiasz.cudnik

FF 3.5 warning comes from HC detection in _bootstrap.js L25. It's about getComputedStyle particularly. Wondering if there's other way to determine is HC active in a browser.

Changed 7 months ago by tobiasz.cudnik

Reason for this is use of "about:blank" hack as image source for browser other than IE 6. FF 3.5 parses this as "url(about:blank)" which is the reason for mixed-content SSL warning.

Changed 7 months ago by tobiasz.cudnik

Changed 7 months ago by tobiasz.cudnik

  • keywords Review? added; Review- removed

Changed 4 months ago by fredck

  • keywords Review- added; Review? removed
  • owner changed from tobiasz.cudnik to garry.yao
  • status changed from assigned to new
  • Let's have a dedicated ticket for each thing at this point. Please open a new ticket for the wysiwyg data loading refactoring and provide a patch there.
  • For this ticket instead, it looks like the HC check fix is the only needed thing. The problem of using spacer.gif is that it makes this image file being downloaded, and we must avoid it. If there is no other way for it, let's include CKEDITOR.env.https in the check.

Changed 4 months ago by garry.yao

Changed 4 months ago by garry.yao

  • keywords Review? added; Review- removed
  • status changed from new to assigned

Both issues ( document.write and about:blank ) are causing the 'partial authentication' error, so fixes to both places are needed.
Proposing of constructing image url with dataURI in supported browsers.

Changed 4 months ago by fredck

  • keywords Review+ added; Review? removed

Please commit it into the 3.1.x branch. We need to well test it over all browsers before releasing.

Changed 4 months ago by garry.yao

  • status changed from assigned to closed
  • resolution set to fixed

Fixed with [4583] at 3.1.x branch.

Changed 2 weeks ago by tkrah

  • status changed from closed to reopened
  • version changed from SVN (CKEditor) to 3.2
  • resolution fixed deleted
  • milestone changed from CKEditor 3.1 to CKEditor 3.x

Updating from 3.1 to 3.2 this is an issue again - don't know if its the same "cause", but firefox does complain again about unsecure content.

Changed 2 weeks ago by garry.yao

  • status changed from reopened to closed
  • resolution set to fixed

We've already have #5359 opened for this, please keep update with that ticket.

Changed 2 weeks ago by alfonsoml

  • version changed from 3.2 to 3.0.2
  • milestone changed from CKEditor 3.x to CKEditor 3.1
Note: See TracTickets for help on using tickets.