在URL中传递JSON的潜在问题 [英] Potential problems with passing JSON in URL

查看:182
本文介绍了在URL中传递JSON的潜在问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网页,基本上是用户填写的表单.

I have a web page that is basically a form the user fills out.

我开发了一个C#VSTO Outlook 2010加载项,该加载项可以根据用户日历上约会的详细信息创建JSON对象. JSON然后通过URL(在查询字符串中)传递到我的网页.传递的对象用于自动填写Web表单上的详细信息.该网页是ASP.NET,尽管我认为这无关紧要.

I developed a C# VSTO Outlook 2010 Add-In that can create a JSON object based on the details of an appointment on a user's calendar. The JSON is then passed via the URL (in the Query String) to my web page. The object that is passed is used to automatically fill in the details on the web form. The web page is ASP.NET, although I don't think that's relevant.

这是我第一次在URL中传递JSON对象.我应该注意任何潜在的陷阱吗?有什么地方可能出问题吗?我在这个问题中看到有人说您可以通过以下方式传递JSON对象网址为没有问题",但存在的问题是我可以这样做吗?"而不是我可能遇到什么问题?"

This is the first time I've ever passed a JSON object in a URL. Are there any potential pitfalls I should watch out for? Anything that could go wrong? I saw in this question that someone said you can pass JSON objects via URL with "no problems" but the question there was "can I do it?" rather than "what problems might I run into?"

推荐答案

最现实的问题(如果您不关心安全性)是GET请求大小限制.例如,对于GET请求,IE的限制为2Kb.这样您就可以解决您的请求了.

The most realistic problem (if you are not concerned with security) is the GET request size limitation. The IE, for example, have limitation of 2Kb for GET requests. So you could get into situation there your request will be trimmed.

对于提到的安全问题,GET请求完全存储在浏览器历史记录中,因此可能会暴露给第三方.

And for the security issues mentioned, the GET requests are stored completely in browser history and thus can be potentially exposed to third-party.

这篇关于在URL中传递JSON的潜在问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆