为了使用Session类,您需要在配置文件中设置加密密钥 [英] In order to use the Session class you are required to set an encryption key in your config file

查看:720
本文介绍了为了使用Session类,您需要在配置文件中设置加密密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将codeigniter从1.7.2升级到2.0.1。



一切似乎都正常,除非我得到


为了使用Session类,您需要在配置文件中设置加密密钥。


导致这种情况的2.0.0 / 2.0.1的变化是什么?



我需要做哪些修改来修复

解决方案

ohai再次 http://ellislab.com/codeigniter/user_guide/libraries/encryption.html:D



他们要求加密金钥的原因是安全性(显然)



:即使您未使用加密会话,也必须在配置文件中设置加密密钥,用于帮助防止会话数据操作。 - source: http://ellislab.com/codeigniter/user_guide/libraries/sessions.html



此修改不会破坏您的代码。但是从1.7.2更新到2.0.1时要小心。我建议您备份您的代码:)



他们在2.0.0版本的CI中添加了这项安全改进。我不知道为什么他们没有在升级指南中提及它:(


I am in the process of upgrading codeigniter from 1.7.2 to 2.0.1.

Everything seems to have gone ok except I get

In order to use the Session class you are required to set an encryption key in your config file.

What is the change in 2.0.0/2.0.1 that has caused this?

What change do I need to make to fix this.

Will making said change break anything?

解决方案

ohai again http://ellislab.com/codeigniter/user_guide/libraries/encryption.html :D

The reason they ask for an encryption key is security (obviously)

Note: Even if you are not using encrypted sessions, you must set an encryption key in your config file which is used to aid in preventing session data manipulation. - source: http://ellislab.com/codeigniter/user_guide/libraries/sessions.html

This modification won't break your code. But be careful when updating from 1.7.2 to 2.0.1. I suggest you to backup your code :)

BTW they added this security improvement with the 2.0.0 version of CI. I don't know why they don't mention it in their upgrade guide though :(

这篇关于为了使用Session类,您需要在配置文件中设置加密密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆