Skip navigation
NoMan\'sLand
Currently Being Moderated

Please help about SWFLoader security

May 13, 2012 11:10 PM

Tags: #security #swfloader

I have a Flex4.5 application who run on Flash Player.

 

I'm uploading a swf file by FileReference controls, then preview it by SWFLoader controls.But I do not want the action script in uploaded swf can visit my action script in my Flex main application.How can I do?

 

Thanks!

 
Replies
  • Currently Being Moderated
    May 14, 2012 8:07 AM   in reply to NoMan\'sLand

    If the AS is required to preview then the preview won’t work.  But if you load the SWF from a different subdomain it will load into its own sandbox where the AS can do less damage, although some SWFs cannot run in a sandbox.

     
    |
    Mark as:
  • Currently Being Moderated
    May 15, 2012 10:48 PM   in reply to NoMan\'sLand

    You can try allowCodeImport, but again, if the SWF needs to run code, it might still fail.

     
    |
    Mark as:
  • Currently Being Moderated
    May 16, 2012 1:14 AM   in reply to Flex harUI

    I've met the same problem.

    If a local swf file is written to byte array by FileReference and assign the byte array to SWFLoader' source,

    loaded swf runs at same sandbox as the main application.

    So loaded swf can access main application' resource.That is a security risk.

     

    Why locally loaded swf can access remotly loaded main application's resource?

     
    |
    Mark as:
  • Currently Being Moderated
    May 16, 2012 10:00 AM   in reply to bingfei001

    Again, you can use allowCodeImport to block running script in the child.

     

    Did you run your test from http://  The security rules are tighter there, and the loaded SWF should be calling from the main apps domain.  It is my understanding that you’ve effectively done a WGET.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points