我正在研究我的网络应用程序的安全性。我目前使用 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-Type
为application/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/