English 中文(简体)
我如何在网页上隐藏敏感信息?
原标题:How can I hide sensitive information in a web page?

I am trying to send a json object that holds quiz data [including answers] from my code behind to javascript. I used...

var quizJson = <%=jsonObj%> 

但是,问题在于,我的使用者非常聪明才智,能够利用观察来源,并揭示答案。 任何建议?

预 收

最佳回答

当用户选择答案时,美国航天署是否发出呼吁。 这样,验证就会是外部的,而用户则敢于找到答案。

问题回答

唯一的正确办法是不以任何形式向浏览器发送答案。 浏览器需要向服务器发送用户回来的答案。 然后,你使用服务器边代码确定答案是否正确。

任何客户都可以阅读你寄给供用户用的笔录。 即便你在来文方中掩盖了答案,但任何人在你“编码”时,都可以 pull笑,看到真正的答案。 就像许多典型的游戏 ha一样,在那里,人们会错乱墙,看到他们过去。 寄给客户的任何信息是 可透露的!

保护答案的唯一途径是将其留在服务器上。 给服务器做答,然后对服务器进行评级,并将结果退回客户。

使用简单的加密(如this),以便从用户那里隐藏该文本。 如果数据不重要,则将取消平均检查。

然而,如果答案对于保持隐蔽性很重要,那么就会将其隐藏在客户之外。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签