Welcome Guest, Not a member yet? Register   Sign In
Community Auth with HMVC
#9

(This post was last modified: 05-17-2017, 11:56 AM by bpuig.)

More info:

When session gets regenerated, in MY_Session sess_regenerate function, it saves the old session asĀ  $this->pre_regenerated_session_id and the new current session as $this->regenerated_session_id.

I had the script make logs of every step, this is what came out:

DOING LOGIN, login is made, page is shown OK
Code:
DEBUG - 2017-05-17 20:34:29 --> pre_regenerated_session_id:iijge1q335sdpqb6u7516isvr7porj3k
DEBUG - 2017-05-17 20:34:29 --> regenerated_session_id:85ldb11gpif6vvsh4mv07sfd4a6jopnl
DEBUG - 2017-05-17 20:34:29 --> Test MX_Controller Initialized
DEBUG - 2017-05-17 20:34:29 --> Encryption: Auto-configured driver 'openssl'.
DEBUG - 2017-05-17 20:34:29 --> regenerated_session_id Auth Model (check_login_status) is checking for :85ldb11gpif6vvsh4mv07sfd4a6jopnl
DEBUG - 2017-05-17 20:34:29 --> query: SELECT `u`.`username`, `u`.`email`, `u`.`auth_level`, `u`.`user_id`, `u`.`banned`
FROM `auth_users` `u`
JOIN `auth_sessions` `s` ON `u`.`user_id` = `s`.`user_id`
WHERE `s`.`user_id` = '2205615491'
AND `s`.`login_time` = '2017-05-17 20:34:22'
AND `s`.`id` = 'iijge1q335sdpqb6u7516isvr7porj3k'
LIMIT 1

DEBUG - 2017-05-17 20:34:29 --> ****ROWS******:1

I have my sess_time_to_update set in 5 secs, to speed things up and see where it blows

Log after refreshing page in 5 secs I GET KICKED OUT
Code:
DEBUG - 2017-05-17 20:34:29 --> File loaded: ../modules/test_1/controllers/Test_1.php
DEBUG - 2017-05-17 20:34:29 --> Test_1 MX_Controller Initialized
DEBUG - 2017-05-17 20:34:29 --> regenerated_session_id auth model (check_login_status) is checking for null:85ldb11gpif6vvsh4mv07sfd4a6jopnl
DEBUG - 2017-05-17 20:34:29 --> query:SELECT `u`.`username`, `u`.`email`, `u`.`auth_level`, `u`.`user_id`, `u`.`banned`
FROM `auth_users` `u`
JOIN `auth_sessions` `s` ON `u`.`user_id` = `s`.`user_id`
WHERE `s`.`user_id` = '2205615491'
AND `s`.`login_time` = '2017-05-17 20:34:22'
AND `s`.`id` = 'iijge1q335sdpqb6u7516isvr7porj3k'
LIMIT 1
DEBUG - 2017-05-17 20:34:29 --> ****ROWS******:0


What I found is that codeigniter is looking for the old session, but my database already has the new one. This is something I dont understand.

Something happened in the middle that I'm missing?

I'll keep looking, any help is appreciated
Reply


Messages In This Thread
Community Auth with HMVC - by koficypher - 12-11-2016, 11:04 AM
RE: Community Auth with HMVC - by skunkbad - 12-11-2016, 12:20 PM
RE: Community Auth with HMVC - by koficypher - 12-11-2016, 01:48 PM
RE: Community Auth with HMVC - by skunkbad - 12-11-2016, 03:25 PM
RE: Community Auth with HMVC - by koficypher - 12-11-2016, 11:43 PM
RE: Community Auth with HMVC - by adrianmak - 01-12-2017, 07:05 PM
RE: Community Auth with HMVC - by skunkbad - 01-12-2017, 08:56 PM
RE: Community Auth with HMVC - by bpuig - 05-17-2017, 07:21 AM
RE: Community Auth with HMVC - by bpuig - 05-17-2017, 11:54 AM
RE: Community Auth with HMVC - by skunkbad - 05-17-2017, 06:37 PM
RE: Community Auth with HMVC - by bpuig - 05-17-2017, 11:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB