I use SWFTools module to include a flash file on my site. It works great. I did come across a small problem.

When viewing the page using IE and though the secure server (https rather than http), IE will display a pop up message. "page contains both secure and non secure items"

I was able to fix this by changing the link to the codebase fom http to https in swftools.module.

CommentFileSizeAuthor
#4 swftools.module.ssl-fix.patch320 bytespearcec

Comments

Stuart Greenfield’s picture

Status: Active » Postponed

Setting to postponed - I haven't really given much thought to https with SWF Tools until now. There might be a neat trick around making this configurable, so I'll move it to postponed pending coming back to this later...

mrfelton’s picture

Version: 5.x-1.1 » 6.x-3.x-dev

Yes, this needs to be addressed as currently local flash files can not be included in https pages without scaring IE users with the warning message. It looks really bad. It would very very simple to detect if the user is in https or not and construct the URL based on that. The following function will detect it for you.

/**
 * Check if the current page is SSL
 */
function _swftools_is_secure() {
  return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? TRUE : FALSE;
}
aabstewart’s picture

Have the same issue. Subscribing.

pearcec’s picture

StatusFileSize
new320 bytes

Anything wrong with this approach?

Stuart Greenfield’s picture

Status: Postponed » Needs review

I'm not sure a fix is needed for 6.x-3.x as it creates relative paths for local files already, which is effectively what the above does.

So the patch is right, but the issue has been solved a different way.

But thanks for posting!

Changing to needs review as this issue should also be fixed in the new release.

pearcec’s picture

Version: 6.x-3.x-dev » 6.x-2.5

Hey looks like I am running 6.x-2.5. If it has been solved this should probably get marked won't fix. But here is patch for those suffering in the mean time. Namely aabstewart.