ICode9

精准搜索请尝试: 精确搜索
首页 > 编程语言> 文章详细

php-在混合应用程序中,如何确认只有您的应用程序正在访问服务器端页面

2019-11-19 01:32:43  阅读:240  来源: 互联网

标签:hybrid-mobile-app security cordova php


混合应用程序显然是新的,因此很难找到关于此的良好信息.我知道我需要在我的服务器端页面上允许跨源共享资源,但这显然增加了安全漏洞.在phonegap / cordova应用程序上,我仅具有客户端控制,并且具有对我的服务器端页面的ajax调用.这意味着任何人都可以访问我的php页面.这意味着任何人都可以通过访问我的所有数据(例如帐户信息等)来模仿我的应用程序.我的问题是如何确认只有我的应用程序正在访问这些页面?请提供具体的编码示例.

解决方法:

我在此博客文章:Client authenticity is not the server’s problem中回答了您的问题,以及许多其他人喜欢的问题.

One of the most basic rules of application security is input validation. The reason this rule is so fundamental is because your server only has control (and visibility) over the software running on itself. Every other device on the Internet is a black box that you can communicate with over networking protocols. You can’t see what it’s doing, you only see the messages that it sends.

The server should remain agnostic to the client.

The software on the client and the software on the server should have a mutual distrust towards each other. Any messages that the server receives should be validated for correctness and handled with care. Data should never be mixed with code if you can help it.

The take-away is: Instead of trying to control your users, focus on making their misbehavior inconsequential to the stability and integrity of your server.

标签:hybrid-mobile-app,security,cordova,php
来源: https://codeday.me/bug/20191119/2032326.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有