As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center 指导。




8年前关闭。




什么类型的数据不应该保存在 session 中?

最佳答案

我真的希望更清楚你的意思是什么类型的 session 。根据答案,我可以想出几个:

  • 任何类型的密码
  • 大量数据,尤其是 32 位操作系统上的 4 GB+(如果必须加载到 RAM 中,则保证内存不足)
  • 可执行代码
  • 原始 SQL
  • 脏话
  • 可能激怒政府机构的事情(中国的“自由西藏”,美国对总统的威胁)
  • 您的银行账户密码或信用卡号
  • 一只狂热的獾。实际上,任何种类的獾。
  • 关于asp.net - 什么样的数据不应该进入 session ?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2181228/

    10-12 12:17
    查看更多