when we detect user disconnection, set the proper expiration time on their cookies

This commit is contained in:
Nikos Mavrogiannopoulos
2015-02-09 10:01:38 +01:00
parent b014f8e1ec
commit ee81ffa10d
4 changed files with 18 additions and 6 deletions

View File

@@ -372,10 +372,7 @@ void remove_proc(main_server_st * s, struct proc_st *proc, unsigned k)
/* expire any available cookies */
if (proc->cookie_ptr) {
proc->cookie_ptr->proc = NULL;
/* if we use session control and we closed the session we
* need to invalidate the cookie, so that a new session is
* used on the next connection */
proc->cookie_ptr->expiration = 1;
proc->cookie_ptr->expiration = time(0) + s->config->cookie_timeout;
}
close_tun(s, proc);