在 Flash 中使用 loadVars 加载 PHP 页面
我正在使用 loadVars 加载包含 Flash 应用程序所需的大量敏感信息的 PHP URL。唯一的问题是 URL 可以通过 Web 浏览器访问,如果有人掌握了该 URL,就会引发安全问题。是否可以仅通过我的 Flash 应用程序访问 PHP 页面?
感谢您的帮助!
谢谢
I'm using loadVars to load a PHP URL with lots of sensitive information required for the Flash application. Only problem is that URL can be accessed via a web browser which raises security issues if someone gets a hold of this URL. Is it possible to have the PHP page only accessible via my Flash application?
Appreciate the help!
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不,没有办法将页面限制为特定的应用程序、浏览器或用户代理,因为所有这些东西都可以被模仿。如果您要传递敏感信息,则需要进行身份验证并使用加密数据传输 (HTTPS)。
No, there is no way to limit a page to a specific app, browser or user agent, since all of those things can be mimicked. If you are passing around sensitive information then you need to do authentication and use encrypted data transfer (HTTPS).
无论您如何尝试使其只能通过 Flash 应用程序访问,坚定的用户也肯定能够查看该页面。它可以像通过 Charles、Firebug 或 Wireshark 等 HTTP 代理代理请求一样简单。
可以采取一些措施来使直接查看页面更难以弄清楚数据是什么。例如,您可以加密数据或将其输出为二进制。但由于 SWF 是一种开源格式,因此用户可以使用反编译器或仅检查 ABC(Actionscript 字节代码)来了解到底发生了什么。
简短的回答是否定的,您无法保护客户端(Flash)可用的信息不被其他客户端访问。
Regardless of how you attempt to make it only accessible from your Flash application, a determined user will certainly be able to view the page also. It can be as simple as proxying the requests through an HTTP proxy like Charles, Firebug or Wireshark.
There are things that can be done to make it more difficult to figure out what the data is from viewing the page directly. For instance, you can encrypt the data or output it as binary. But since SWF is an open sourced format, users can use decompilers or just inspect the ABC (Actionscript Byte Code) to see what is really going on.
The short answer is NO, you cannot protect the information available to the client side (Flash) from being accessible from other clients.
只要您有一个基于 HTTP 的页面,坚定的用户就总能找到解决您施加的任何用户代理限制的方法。
保护数据的一种方法(除了使用 HTTPS)是在服务器上对其进行加密,通过 HTTP 发送数据,然后使用 as3Crypto 或其他加密库在 Flash 中对其进行解密。
希望这有帮助,
As long as you have a page on HTTP, a determined user can always find a way around any user-agent restrictions imposed by you.
One way to protect the data (other than using HTTPS) is to encrypt it at the server, send it over HTTP and then decrypt it in Flash using as3Crypto or some other cryptography library.
Hope this helps,