Skip to content

Commit

Permalink
set cookie life sooner and every time (#2188)
Browse files Browse the repository at this point in the history
  • Loading branch information
GlazerMann committed Oct 9, 2019
1 parent 6057511 commit 9fda356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion authenticate.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
@session_start();
@setcookie(session_name(),session_id(),time()+(365*24*3600)); // set time length on web browser
error_reporting(E_ALL^E_NOTICE);
define("HTML_OUTPUT");

Expand Down Expand Up @@ -53,7 +54,6 @@
$_SESSION['access_key'] = $accessToken->key;
$_SESSION['access_secret'] = $accessToken->secret;
unset($_SESSION['request_key']);unset($_SESSION['request_secret']);
setcookie(session_name(),session_id(),time()+(365*24*3600)); // set time length on web browser
if (isset($_GET['return'])) {
$return = $_GET['return'];
header("Location: $return");
Expand Down

0 comments on commit 9fda356

Please sign in to comment.