用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2960|回复: 4
收起左侧

session 一直过期登录总是失效,一直登陆失败

[复制链接]
发表于 2013-8-15 09:48:04 | 显示全部楼层 |阅读模式
其他网络登录正常,在特定的无线网络下登录时,总是失败,错误日志记载
ERROR - 2013-08-14 16:47:21 --> The session cookie data did not match what was expected. This could be a possible hacking attempt.

是执行到下面 if ($hash !==  md5($session.$this->encryption_key))
是销毁了session,而且在系统session表中 会在同一时间插入三条session 有两条没有user_date值的。(注:这个机制是采用stblog的)
请教解决方法。
system/libraries/session.php
   // encryption was not used, so we need to check the md5 hash
   $hash  = substr($session, strlen($session)-32); // get last 32 chars
   $session = substr($session, 0, strlen($session)-32);

   // Does the md5 hash match?  This is to prevent manipulation of session data in userspace
   if ($hash !==  md5($session.$this->encryption_key))
   {
    log_message('error', 'The session cookie data did not match what was expected. This could be a possible hacking attempt.');
    $this->sess_destroy();
    return FALSE;
   }
发表于 2013-9-6 09:02:56 | 显示全部楼层
楼主解决了这个问题嘛?求交流啊,我也碰到了
发表于 2013-10-10 12:06:11 | 显示全部楼层
这个问题,试试把user_agent字段长度调整为120或者更大
发表于 2013-11-13 23:27:22 | 显示全部楼层
reachcool 发表于 2013-10-10 12:06
这个问题,试试把user_agent字段长度调整为120或者更大

还真是这个原因,这是因为什么啊?
发表于 2013-11-13 23:33:55 | 显示全部楼层
屠城 发表于 2013-11-13 23:27
还真是这个原因,这是因为什么啊?

知道了,是在system/libraries/session.php中

本版积分规则