Welcome Guest, Not a member yet? Register   Sign In
Session fixsession config
#1
Wink 

Please help me for config session fixsession, in codeigniter 4
Reply
#2

So what is it that needs fixing?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

The session that is created and stored in the browser cookies user can be used by many users, if the browser cookies are stolen by someone else, get added the config session feature can only be used by one user and one computer, even if the browser cookies are stolen the cookies are not can be used on another computer
Reply
#4

May be we are talking about session regeneration?
Reply
#5

yes, you can call it like that, but I mean if there is a session that is stored in the browser cookies, then the cookies are successfully stolen by another user, these cookies are not considered valid by the system and the page will be forwarded to the login page
Reply
#6

(This post was last modified: 07-14-2023, 12:12 AM by luckmoshy.)

In CI you can do things in either.env or in APP, like



Code:
app.sessionDriver = 'CodeIgniter\Session\Handlers\FileHandler'
  app.sessionCookieName = 'ci_session'
  app.sessionExpiration = 7200
  app.sessionSavePath = writable/session
  app.sessionMatchIP = true
  app.sessionTimeToUpdate = 1  /*300*/
  app.sessionRegenerateDestroy = true
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply
#7

(This post was last modified: 07-20-2023, 07:29 AM by pm2monit.)

[quote pid="411088" dateline="1689318696"]
The following example is the code config on codeigniter 3

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = TRUE;
$config['sess_time_to_update'] = 1;
$config['sess_regenerate_destroy'] = TRUE;


can this be done in codeigniter 4
[/quote]
Reply
#8

If you look at CodeIgniter 4 app/Config/App.php you will see it's almost the same.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#9

See app/Config/Session.php
https://github.com/codeigniter4/CodeIgni...ession.php
Reply




Theme © iAndrew 2016 - Forum software by © MyBB