Welcome Developers!

in

Welcome!

in

Flash security violation - cannot send HTTP headers

Last post 07-30-2009 10:21 AM by Sailesh. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 06-12-2009 12:08 PM

    • k
    • Not Ranked
    • Joined on 08-20-2008
    • Posts 4

    Flash security violation - cannot send HTTP headers

    First of all let me say that any server side support to bypass any sort of Flash security restriction is out of the question in my situation, which explains my method of setting up my swf file. I am also not developing in Flex.

    I currently have my swf built using the AS3 MySpaceID SDK (http://code.google.com/p/myspaceid-as3-sdk/) provided by MySpace. I have it set up such that it's hosted on myspacecdn.com (via Edit Source), and embeded from an external html file hosted on my server. This all works - authenticating, accessing user data (getProfile(), getMood()...etc). So far so good. But when I start to fire methods such as setMood(), which the SDK sends an HTTP header with PUT, I get this following error:

    Error #2044: Unhandled securityError:. text=Error #2170: Security sandbox violation: http://cache01-widget01.myspacecdn.com/1/l_6955ede2a5d36a933586b6a9d4b16c20.swf cannot send HTTP headers to http://api.myspace.com/v1/users/26946321/mood.xml?oauth_consumer_key=b1dd0506f6014dab869be836546cdd96&oauth_nonce=0CYuBuzL9R0&oauth_signature=HNh4xJAF2Ncz%2FSmykSZBT87HUMQ%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1244831367.

    A little digging explains this - http://kb2.adobe.com/cps/403/kb403030.html (Was MySpace aware of these restrictions)

    So as far as I know there are two ways to get this work:

    1. For MySpace to add "<allow-http-request-headers-from>" tag into their crossdomain.xml to open up access for Flash HTTP headers (http://www.adobe.com/devnet/flashplayer/articles/flash_player9_security_update.html). This seems to make sense since the AS3 SDK framework is designed to leverage this approach. 

    2. Use ExterenalInterface to leverage Opensocial's JS api as a bridge to by pass the security restrction, but how, since my swf container html is else where and there is no direct access to the OpenSocial JS API files (seems that you must create a gadget to be hosted on the container platform and run the API from there)? This is just not Flash friendly.

    Thanks for your help.

    Filed under: , , ,
  • 06-13-2009 7:28 PM In reply to

    Re: Flash security violation - cannot send HTTP headers

    Hi, 

    The AS3 SDK is very new. I'll connect with the creators and see if they can help :)

    Rhonda

  • 06-15-2009 2:39 PM In reply to

    Re: Flash security violation - cannot send HTTP headers

    We will try to add the following to the crossdomain.xml file

     <allow-http-request-headers-from domain="*" headers="*" secure="false"/>

     Thanks,

    Sailesh

     

  • 06-16-2009 7:42 AM In reply to

    • k
    • Not Ranked
    • Joined on 08-20-2008
    • Posts 4

    Re: Flash security violation - cannot send HTTP headers

    That will certainly be great. Thanks Sailesh. Please keep us posted when that gets added.

     Kenny

  • 06-20-2009 1:14 PM In reply to

    Re: Flash security violation - cannot send HTTP headers

    Sailesh,

    Could you also do something about the crossdomain.xml file on the myspacecdn servers? The current files (e.g. http://c4.ac-images.myspacecdn.com/crossdomain.xml) make it hard for developers of external MyspaceID flash applications to access users' profile information.

    Adding allow-access-from domain="*" secure="true" will solve this issue. Please let me know what you think.

    Thanks,
    Karthik
  • 07-12-2009 9:49 PM In reply to

    • Rob
    • Not Ranked
    • Joined on 06-26-2009
    • Posts 1

    Re: Flash security violation - cannot send HTTP headers

    I agree, MySpace must put wide open crossdomain.xml files on both api.myspace.com and api.msappspace.com. Facebook's REST API is wide open so we should do the same. I'm developing on the new MySpace SDK and this is a big blocker.

    Filed under:
  • 07-13-2009 2:39 PM In reply to

    Re: Flash security violation - cannot send HTTP headers

    Sailesh,

    Did you try this?

    http://api.myspace.com/crossdomain.xml still doesn't have the allow line.

    Michael

    Filed under:
  • 07-15-2009 12:41 PM In reply to

    • Kiam
    • Top 75 Contributor
    • Joined on 02-19-2009
    • Posts 62

    Re: Flash security violation - cannot send HTTP headers

     We will soon be opening up on api.myspace.com.  Please stay tuned.

    Follow us on twitter for major updates and announcements:

    http://twitter.com/MySpaceDevTeam

    Friend the MDP Profile!
    http://profile.myspace.com/index.cfm?fuseaction=user.viewProfile&friendID=295946135
  • 07-30-2009 10:21 AM In reply to

    Re: Flash security violation - cannot send HTTP headers

     We opened up the crossdomain file on api.myspace.com this morning. This should resolve the issues you guys were seeing.

Page 1 of 1 (9 items)