Skip to content

Commit

Permalink
Set cookies with httponly
Browse files Browse the repository at this point in the history
  • Loading branch information
oricgn committed Apr 14, 2016
1 parent c19b112 commit d24e98f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions include/api/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -2207,7 +2207,10 @@ function phorum_api_user_session_create($type, $reset = 0)
PHORUM_SESSION_LONG_TERM,
$user['user_id'].':'.$sessid_lt,
$timeout,
$PHORUM['session_path'], $PHORUM['session_domain']
$PHORUM['session_path'],
$PHORUM['session_domain'],
false,
true // httponly
);
} else {
// Add the session id to the URL building GET variables.
Expand All @@ -2227,7 +2230,10 @@ function phorum_api_user_session_create($type, $reset = 0)
PHORUM_SESSION_SHORT_TERM,
$user['user_id'].':'.$user['sessid_st'],
$user['sessid_st_timeout'],
$PHORUM['session_path'], $PHORUM['session_domain']
$PHORUM['session_path'],
$PHORUM['session_domain'],
false,
true // httponly
);
}
}
Expand All @@ -2238,7 +2244,10 @@ function phorum_api_user_session_create($type, $reset = 0)
PHORUM_SESSION_ADMIN,
$user['user_id'].':'.$sessid_admin,
0, // admin sessions are destroyed as soon as the browser closes
$PHORUM['session_path'], $PHORUM['session_domain']
$PHORUM['session_path'],
$PHORUM['session_domain'],
false,
true // httponly
);
}

Expand Down

0 comments on commit d24e98f

Please # to comment.