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 abe25c7 commit 2fe0f1a
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 @@ -2167,7 +2167,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 @@ -2187,7 +2190,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 @@ -2198,7 +2204,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 2fe0f1a

Please sign in to comment.