【发布时间】:2011-05-19 11:58:46
【问题描述】:
我正在使用 PHP 代理脚本将图像从 Facebook 加载到 Flash 中,而不会违反任何沙盒。它取自此处的指南:http://www.permadi.com/blog/2010/12/loading-facebook-profile-picture-into-flash-swf-using-open-graph-api/。相关的PHP代码是:
<?php
$path=$_GET['path'];
if (stristr($path, "fbcdn.")==FALSE && stristr($path, "facebook.")==FALSE)
{
echo "ERROR";
exit;
}
header("Content-Description: Facebook Proxied File");
header("Content-Type: image");
header("Content-Disposition: attachment; filename=".$path);
@readfile($path);
?>
该指南提到建议为现实世界的应用程序采取额外的安全措施。对此有何额外措施?也许某种从 Flash 传递到 PHP 的密钥?
我意识到我无法完全保护 Flash 不被反编译,但我可以防止脚本被恶意使用吗?
【问题讨论】:
标签: php flash security facebook proxy