【问题标题】:Is using http Post instead of http Get to send authntication token is considered more secure使用 http Post 而不是 http Get 发送身份验证令牌被认为更安全
【发布时间】:2015-09-10 17:48:02
【问题描述】:

我的 asp.net mvc Web 应用程序中有以下方法,它调用外部 API,绕过身份验证标头中的身份验证令牌:-

try
           {

               string currentURL = System.Web.Configuration.WebConfigurationManager.AppSettings["scanningURL"];
               string token = System.Web.Configuration.WebConfigurationManager.AppSettings["TMSToken"];
               using (WebClient wc = new WebClient())
               {
                   string url = currentURL + "home/scanserver?FQDN=allscan" ;
                   wc.Headers.Add("Authorization", 
  token);
                   var json = await  wc.DownloadStringTaskAsync(url);
                   TempData["messagePartial"] = string.Format("Scan has been completed. Scan reported generated");

               }




           }

现在,如果我像现在一样发送 Post 请求而不是 Get 请求,或者它们具有相同的安全级别,这会被认为更安全吗?

第二个问题是关于语义的。现在这个请求是针对网络扫描的,网络扫描将使用扫描结果修改数据库。那么我是否应该在所有情况下都使用 Post 请求而不是 Get,因为该请求将修改数据库,或者换句话说将调用另一个将修改数据库的操作方法? 谢谢

【问题讨论】:

    标签: asp.net http post https get


    【解决方案1】:

    试试 Wireshark 软件,在这里你可以点击你的 get 或 post 请求,然后你会看到 post 或 get 都向网络暴露了相似数量的数据。

    关注此博客以获取更多获取或发布用例 Is either GET or POST more secure than the other?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-05
      • 1970-01-01
      • 2015-06-02
      • 2017-08-09
      • 1970-01-01
      • 2011-12-05
      • 1970-01-01
      • 2013-02-12
      相关资源
      最近更新 更多