Flex - Security Sandbox violation - ERROR#2048 - actionscript-3

So if i put -http://xxx.xx.xx.x/website/website.html and try to use an HTTPService with in the swf to contact -https://yyy.yy.yy.y/resources/script, I get the sandbox error.
If I put -https://yyy.yy.yy.y/crossdomain.xml in the browser and access it everything in the crossdomain file looks fine.
wWen i go back and try to use the HTTPService from -http://xxx.xx.xx.x/website/website.html everything now works until i close the browser which i assume clears the cache.
********crossdomain.xml*********
<?xml version="1.0" ?>
<cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only"/>
<allow-access-from domain="*"/>
<allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>
********Action Script*************
Security.loadPolicyFile("https://xxx.xx.xx.x/crossdomain.xml");

Change the following line:
<allow-access-from domain="*"/>
to:
<allow-access-from domain="*" secure="false" />
You can read more about it at adobe.com...
http://kb2.adobe.com/cps/142/tn_14213.html

We found that Chrome will refuse self-signed SSL certificates but Firefox and Safari will plow on ahead. Try a different browser and see if that works for you.

Related

PageSpeed Insigths and GoDaddy Windows Hosting

I'm having an issue with cache in my webpage.
My webpage is hosted by GoDaddy, with the Economic Windows Server with Plesk.
conexaomktdigital.com.br
It's a very simple site, I DONT USE PHP on it, only HTML, CSS and simple bootstrap JS.
When I run PageSpeed Insights, the results are telling me to optimize browser cache, including adding expire dates to my .css and images.
Mobile: 60/100
Desktop: 75/100
HOW I DO IT? I seek everywhere and don't see anything, everybody talks about .htaccess, but it's not apache, it's windows with plesk by GoDaddy... What should I do, can someone help me?
Create and use a correct 'Web.Config' file. put it in your root folder.
You can find some information about how to use a web.config file with te right tags here:
https://www.giftofspeed.com/leverage-browser-caching/
I use a very simple configuration, it appears to work nice for me:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
<caching enabled="true" enableKernelCache="true">
<profiles>
<add extension=".html" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
<add extension=".css" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
<add extension=".js" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
<add extension=".jpg" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
<add extension=".png" policy="CacheUntilChange" kernelCachePolicy="CacheUntilChange"/>
</profiles>
</caching>
</system.webServer>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/>
</system.web>
</configuration>
this will keep the files listed there in cache until it have some change.
No Error 500 for me, I think it will not happen to you too.

Why I've a cayenne connection error when I put my web site on a debian server

I'm trying to put my web site on line.
For that, I've a debian and a jetty server.
When I try to go on my web site, it show my the homepage, so, this is ok.
But, when I try to log in, it put me an error message.
It's working on my local machine with this configuration :
<?xml version="1.0" encoding="utf-8"?>
<domain project-version="6">
<map name="datamap"/>
<node name="datanode"
factory="org.apache.cayenne.configuration.server.XMLPoolingDataSourceFactory"
>
<map-ref name="datamap"/>
<data-source>
<driver value="com.mysql.jdbc.Driver"/>
<url value="jdbc:mysql://127.0.0.1:3306/database"/>
<connectionPool min="1" max="10"/>
<login userName="username" password="password"/>
</data-source>
</node>
</domain>
So,I verified the username and password are ok. I tried to execute my web site on my own machine with the new configuration :
<url value="jdbc:mysql://serverip:3306/database"/>
What did I miss?
The error message is :
(I'm sorry, I'm trying to find where I can find the jetty log on the server, I will update it with the full stack)
I supposed I forget one information?
I'm sure about my password and login for the mysql on the server. I'm using SSH, the configuration is in my workbench :
I'm using maven, so I add mysql in the pom.xml :
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
I read that can be because we didn't put the mysql in the classpath. But, that should works, shouldn't it?
EDIT : I tried : <url value="jdbc:mysql://serverusername#serverpwd/serverip:3306/database"/>, without success...
EDIT 2 : This configuration is working :
<node name="datanode"
factory="org.apache.cayenne.configuration.server.XMLPoolingDataSourceFactory"
schema-update-strategy="org.apache.cayenne.access.dbsync.CreateIfNoSchemaStrategy">
<map-ref name="datamap" />
<data-source>
<driver value="com.mysql.jdbc.Driver" />
<url value="jdbc:mysql://127.0.0.1/database" />
<connectionPool min="1" max="1" />
<autoReconnect> true</autoReconnect>
<failOverReadOnly> false</failOverReadOnly>
<login userName="userName" password="password" />
</data-source>
</node>
The connection may be timing out. Try adding this to the URL: ?connectTimeout=0&autoReconnect=true. For an even more reliable result, try using an external connection pool, e.g. Hikari, with appropriate reconnect properties. Cayenne can be instructed to use an external connection pool on startup via ServerRuntime.builder(..).dataSource(dataSource)..

Error #2044 Adobe flex

I have to display an image from an external URL but the Adobe flash debugger displays
Error #2044: Unhandled securityError:. text=Error #2048: Security
sandbox violation**:**
http://localhost:8080/folder1/folder2/media/swf_demo.swf cannot load
data from http://example.com/image.
A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.
I have included a crossdomain.xml in my tomcat root server. Its contents are as follows:
<?xml version="1.0"?>
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*"/>
<allow-http-request-headers-from domain="*" headers="*"/>
<allow-http-request-headers-from domain="*"/>
</cross-domain-policy>
My mxml code of displaying the image is as follows:
<mx:Canvas>
<controls:MultiSourceImage id="Icon" width="19" height="19" x="3" y="3" trustContent="true"/>
<mx:Image id="Badge" width="11" height="11"/>
</mx:Canvas>
The image is not getting displayed.
Am I missing something? Or am I going wrong somewhere?

how to use the Google Drive API in the flash player?

i want to use google drive api in my flash component.
i get a access key but i cant use google drive api.
i want to insert file to google drive.
var urlLoader:MultipartURLLoader = new MultipartURLLoader();
urlLoader.addEventListener(Event.COMPLETE, uploadCompleteHandler);
urlLoader.addEventListener(IOErrorEvent.IO_ERROR, uploadIOErrorHandler);
urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, uploadSecurityErrorHandler);
urlLoader.requestHeaders.push(new URLRequestHeader("Authorization", authorization));
urlLoader.load('https://www.googleapis.com/upload/drive/v2/files');
i get the following error
[SecurityErrorEvent type="securityError" bubbles=false cancelable=false
eventPhase=2 text="Error #2170: Security sandbox violation:
http://myserver.com/myflash.swf cannot send
HTTP headers to https://www.googleapis.com/upload/drive/v2/files."]
https://www.googleapis.com/crossdomain.xml
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/crossdomain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only"/>
<allow-access-from domain="*.google.com" secure="false"/>
<allow-access-from domain="*.doubleclick.com" secure="false"/>
<allow-access-from domain="*.doubleclick.net" secure="false"/>
<allow-access-from domain="*.gstatic.com" secure="false"/>
<allow-access-from domain="*.teracent.net" secure="false"/>
<allow-access-from domain="*.2mdn.net" secure="false"/>
<allow-access-from domain="*.youtube.com" secure="false"/>
<allow-access-from domain="*.ytimg.com" secure="false"/>
<allow-http-request-headers-from domain="*" headers="Accept,Accept-Language,Authorization,Cache-Control,Content-Disposition,Content-Encoding,Content-Language,Content-Length,Content-MD5,Content-Range,Content-Type,Date,GData-Version,Host,If-Match,If-Modified-Since,If-None-Match,If-Unmodified-Since,Origin,OriginToken,Pragma,Range,Slug,Transfer-Encoding,X-ClientDetails,X-GData-Client,X-GData-Key,X-Goog-AuthUser,X-Goog-Encode-Response-If-Executable,X-Goog-Upload-Command,X-Goog-Upload-Content-Disposition,X-Goog-Upload-Content-Length,X-Goog-Upload-Content-Type,X-Goog-Upload-Offset,X-Goog-Upload-Protocol,X-HTTP-Method-Override,X-JavaScript-User-Agent,X-Origin,X-Referer,X-Upload-Content-Length,X-Upload-Content-Type,X-Use-HTTP-Status-Code-Override,X-YouTube-VVT"/>
</cross-domain-policy>
my server crossdomain.xml
<cross-domain-policy>
<allow-access-from domain="*"/>
<site-control permitted-cross-domain-policies="all"/>
<allow-http-request-headers-from domain="*"/>
</cross-domain-policy>
plz can someone tell me a solution

Why do i get Security sandbox voilation error even after adding crossdomain.xml?

I was getting this error earlier as
Security sandbox voilation: cannot load data from http://sample:8080/SignOut
What i got to know it to add a crossdomain.xml inside the tomcat/webapps/ROOT/ folder.
But interesting thing is that, even after adding this am getting the same error. Why?
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>