SSL还会加密Cookie吗?

编程入门 行业动态 更新时间:2024-10-24 18:19:07
本文介绍了SSL还会加密Cookie吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

对SO的审查并未明确回答这个问题。这可能是隐含的,但我想特别记录下来。

A review of SO doesn't categorically answer this question. It could be implied, but I would like to get it on the record specifically.

如果SSL处于活动状态,它将加密HTTP标头数据,如set-cookie ?我知道setSecure仅在HTTPS处于活动状态时传输cookie,但如果SSL处于活动状态,我想确认所有头数据是否默认加密而无需使用setSecure。

If SSL is active, it will encrypt HTTP header data, like "set-cookie" ? I know about "setSecure" to only transmit cookie's if HTTPS is active, but if SSL is active I would like to confirm if all header data is encrypted by default without the need to use "setSecure".

推荐答案

通过SSL(HTTPS)发送的数据是完全加密的,包括标头(因此是cookie),只有您发送请求的主机未加密。这也意味着GET请求已加密(URL的其余部分)。

Data sent over SSL (HTTPS) is fully encrypted, headers included (hence cookies), only the Host you are sending the request to is not encrypted. It also means that the GET request is encrypted (the rest of the URL).

虽然攻击者可以强制客户端通过HTTP进行响应,但强烈建议使用cookie中的安全标志,强制使用HTTPS发送cookie。

Although an attacker could force a client to respond over HTTP, so it is highly recommended to use the "Secure" flag in your cookie, which enforce the use of HTTPS to send cookies.

此外,使用HTTPOnly标志可以大大提高您网站的安全性。它不允许使用Javascript代码读取Cookie(减少潜在的XSS漏洞)。

Also, using the flag HTTPOnly would greatly enhance the security of your site since it does not allow Cookies to be read with Javascript code (Mitigating potential XSS vulnerabilities).

更多推荐

SSL还会加密Cookie吗?

本文发布于:2023-11-06 01:30:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1562386.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:还会   SSL   Cookie

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!