javascript - $.ajax 后置函数安全性

标签 javascript php jquery ajax

我正在研究我的网络应用程序的安全性。我目前使用 ajax post 登录我的用户到 php 文件。

$.ajax({
        type: "POST",
        url: "login_StartUserSession.php",
        data: ({usr: theUser, pwd: thePassword}),
        cache: false,
        dataType: "text",
        success:  function(data){.....}

我想知道这些数据是如何传递到服务器的。默认情况下它只是纯文本吗?这可能是一个安全问题吗?我可以在不使用 HTTPS 的情况下加密密码吗?

最佳答案

I'd like to know how this data is passed to the server.

默认情况下,它的Content-Typeapplication/x-www-form-urlencoded,传输的数据看起来像usr=test&pwd=测试

Is this a possible security issue?

仅当您将数据发送到的 URL 是 HTTP 时。对于任何敏感内容,您都需要 HTTPS。

关于javascript - $.ajax 后置函数安全性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36401564/

相关文章:

javascript - 使用 jquery 的嵌套选项卡

javascript - 调用 CSS 类而不是使用 JQuery (.css()) 插入属性

javascript - DRY React 编写多个类似的函数

javascript - DOM 插入的简单 JavaScript 错误

php - 动态加载 div 上的 Jquery

php - SQL QUERY 没有得到我期望的结果

javascript - 使用 module.exports 上面的函数可以吗?

javascript - Redux- mapStateToProps 不工作

php - Reason for Undefined class constant NOTICE in PHP (未定义常量的使用)

c# - JQuery Ajax 函数不调用 DNN 中的后端方法