<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mark Ledford&#039;s Web Dev Blog &#187; security</title>
	<atom:link href="http://www.markledford.com/blog/tag/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markledford.com/blog</link>
	<description>Documenting the trials and triumphs of a mobile / front end web developer</description>
	<lastBuildDate>Fri, 03 Feb 2012 19:16:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>flash player 10 security change can break focus logic with cross domain swfs</title>
		<link>http://www.markledford.com/blog/2009/08/28/flash-player-10-security-change-can-break-focus-logic-with-cross-domain-swfs/</link>
		<comments>http://www.markledford.com/blog/2009/08/28/flash-player-10-security-change-can-break-focus-logic-with-cross-domain-swfs/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 06:22:48 +0000</pubDate>
		<dc:creator>markledford</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.markledford.com/blog/?p=70</guid>
		<description><![CDATA[With the barrage of player updates and security changes to the Flash Player staying on top of the issues and incompatibilities from player to player is sometimes as troublesome as cross browser compatibility for regular web development. This is especially true for the upgrade from Flash Player 9 to 10. There were some well publicized [...]]]></description>
			<content:encoded><![CDATA[<p>With the barrage of player updates and security changes to the Flash Player staying on top of the issues and incompatibilities from player to player is sometimes as troublesome as cross browser compatibility for regular web development. This is especially true for the upgrade from Flash Player 9 to 10.</p>
<p>There were some well publicized major security changes for <a href="http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes_02.html#head1">policy files</a> and the <a href="http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes_02.html#head3" target="_blank">filereference</a> class included with the Flash Player 10 security updates but a seemingly less significant new restriction regarding cross domain swf focus can wreak havoc on an existing flash project . The new restriction is outlined here:<br />
<a href="http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes_02.html#head33" target="_blank">Related-object properties in events may not be available</a></p>
<blockquote><p>Starting in Flash Player 10.0.2, if an object that would be referred to by any of these properties [MouseEvent.relatedObject, FocusEvent.relatedObject, ContextMenuEVent.mouseTarget] resides in a different security sandbox (for example, because it is part of a different SWF that was served from a different domain), and the two sandboxes do not both trust each other (by means of the Security.allowDomain method), then the value of this property is changed to null.</p></blockquote>
<p>I&#8217;ve found this is a significant change for cross domain swfs that utilize any of Flash&#8217;s V3 Components. Some 3rd party crossdomain swfs that once worked fine will no longer focus properly when clicking on textfields. Digging into this component architecture&#8217;s FocusManger you can find the culprit:</p>
<p>fl.managers.FocusManager::mouseFocusChangeHandler(event:FocusEvent)</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #808080; font-style: italic;">/**<br />
*  @private<br />
*  This gets called when mouse clicks on a focusable object.<br />
*  We block Flash Player behavior.<br />
*<br />
* @langversion 3.0<br />
* @playerversion Flash 9.0.28.0<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> mouseFocusChangeHandler<span style="color: #66cc66;">&#40;</span>event:FocusEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp;<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">relatedObject</span> is <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #808080; font-style: italic;">//&lt;- related object will always be null </span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span>; <span style="color: #808080; font-style: italic;">// pass it on</span><br />
&nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp;event.<span style="color: #006600;">preventDefault</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>The solution is to add a Security.allowDomain(&#8220;YourDomain&#8221;) if you have access to republish, otherwise you&#8217;d have to use a proxy server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markledford.com/blog/2009/08/28/flash-player-10-security-change-can-break-focus-logic-with-cross-domain-swfs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

