flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Harui (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-34834) security error when using image tag in html
Date Thu, 07 May 2015 06:08:00 GMT

    [ https://issues.apache.org/jira/browse/FLEX-34834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14532074#comment-14532074
] 

Alex Harui commented on FLEX-34834:
-----------------------------------

Seems like you may not even want the if statement to run, and you'd rather have the else clause
just run.  If that's true, you might block the running of the if statement by first checking
contentType:

			//bug #2931005 TLF cannot show Flex SWF after loading it as an ILG
			if(graphic is Loader && Loader(graphic).contentLoaderInfo.contentType == "application/x-shockwave-flash"
&& Loader(graphic).content != null && Loader(graphic).content.hasOwnProperty("setActualSize")
&& (!widthIsComputed() || !heightIsComputed()) )
				Object(Loader(graphic).content).setActualSize(elementWidth, elementHeight);
			else
			{
				if (!widthIsComputed())
                	g.width  = elementWidth;
            	if (!heightIsComputed())
                	g.height = elementHeight;
			}


> security error when using image tag in html
> -------------------------------------------
>
>                 Key: FLEX-34834
>                 URL: https://issues.apache.org/jira/browse/FLEX-34834
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: TextArea
>    Affects Versions: Apache Flex 4.14.0
>         Environment: windows
>            Reporter: ty ro
>
> SecurityError: Error #2122: Security sandbox violation: Loader.content: 
> http://mydomain.com/Client/myapplication.swf cannot access 
> http://differentdomain.com/image.png. A policy file is required, but the 
> checkPolicyFile flag was not set when this media was loaded. 
> at flash.display::Loader/get content() 
> at 
> flashx.textLayout.elements::InlineGraphicElement/loadCompleteHandler()[/Users/aharui/git/flex/master/flex-tlf/textLayout/src/flashx/textLayout/elements/InlineGraphicElement.as:703]

> The image actually loads successfully in-spite of the error, but it doesn't 
> being measured correctly, so the image can exceed the component's 
> boundaries and overlap the text after it. 
> using .swf debug on desktop does not reproduce this. using on browser does regardless
if it is debug release or build release.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message