Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

*HOTFIX* Session fix? :D

  • Loading branch information...
Stoyvo committed May 7, 2014
1 parent fe143b1 commit f854cee94812a134497fc12c60376ad82ec3f19b
Showing with 43 additions and 32 deletions.
  1. +6 −4 ajax.php
  2. +7 −10 includes/inc.php
  3. +5 −4 index.php
  4. +3 −1 login.php
  5. +1 −0 logout.php
  6. +2 −0 rig.php
  7. +6 −4 settings.php
  8. +7 −5 update.php
  9. +6 −4 wallet.php
@@ -1,10 +1,12 @@
<?php
require_once('includes/inc.php');
//if (!$_SESSION['login_string']) {
// http_response_code(401); // 401 = Unauthorized
// exit();
//}
if (!$_SESSION['login_string']) {
http_response_code(401); // 401 = Unauthorized
exit();
}
session_write_close();
global $CACHED;
if (isset($_GET['cached']) && $_GET['cached'] == 0) {
@@ -4,20 +4,17 @@
error_reporting(E_ERROR);
//error_reporting(E_ALL);
//session_name('cryptoGlance'); // feel free to rename this!
session_name('cryptoGlance'); // feel free to rename this!
// Forces use of cookies
//if (ini_set('session.use_only_cookies', 1) === FALSE) {
// die('Error: We require that sessions only use cookies. Consult your PHP config to resolve this issue.');
//}
if (ini_set('session.use_only_cookies', 1) === FALSE) {
die('Error: We require that sessions only use cookies. Consult your PHP config to resolve this issue.');
}
// Gets cookies params
//$cookieParams = session_get_cookie_params();
//session_set_cookie_params($cookieParams['lifetime'], $cookieParams['path'], $cookieParams['domain'], false, true);
//session_start();
//if (!defined(LOGIN) && !LOGIN) {
// session_write_close();
//}
$cookieParams = session_get_cookie_params();
session_set_cookie_params($cookieParams['lifetime'], $cookieParams['path'], $cookieParams['domain'], false, true);
session_start();
require_once('config.php');
@@ -1,10 +1,11 @@
<?php
include('includes/inc.php');
//if (!$_SESSION['login_string']) {
// header('Location: login.php');
// exit();
//}
if (!$_SESSION['login_string']) {
header('Location: login.php');
exit();
}
session_write_close();
require_once('includes/cryptoglance.php');
$cryptoGlance = new CryptoGlance();
@@ -13,7 +13,7 @@
$_SESSION['login_string'] = hash('sha512', $_POST['password'] . $_SERVER['HTTP_USER_AGENT']);
session_regenerate_id(); // This hangs sometimes and we dont know why...
session_write_close();
header('Location: index.php');
exit();
} else {
@@ -22,6 +22,8 @@
}
}
session_write_close();
include("includes/login-header.php");
?>

@@ -5,6 +5,7 @@
session_unset();
session_destroy();
session_write_close();
header('Location: login.php');
exit();
@@ -6,6 +6,8 @@
exit();
}
session_write_close();
$jsArray = array();
require_once("includes/header.php");
require_once('includes/autoloader.inc.php');
@@ -1,10 +1,12 @@
<?php
include('includes/inc.php');
//if (!$_SESSION['login_string']) {
// header('Location: login.php');
// exit();
//}
if (!$_SESSION['login_string']) {
header('Location: login.php');
exit();
}
session_write_close();
$errors = array();
$generalSaveResult = null;
@@ -1,14 +1,16 @@
<?php
include('includes/inc.php');
//if (!$_SESSION['login_string']) {
// header('Location: login.php');
// exit();
//} else
if (!$_COOKIE['cryptoglance_version']) {
if (!$_SESSION['login_string']) {
header('Location: login.php');
exit();
} else if (!$_COOKIE['cryptoglance_version']) {
header('Location: index.php');
exit();
}
session_write_close();
if (isset($_POST['cryptoglance_version']) &&
($_POST['cryptoglance_version'] != CURRENT_VERSION) &&
($_SERVER['PHP_SELF'] == $_SERVER['REQUEST_URI'])
@@ -1,10 +1,12 @@
<?php
include('includes/inc.php');
//if (!$_SESSION['login_string']) {
// header('Location: login.php');
// exit();
//}
if (!$_SESSION['login_string']) {
header('Location: login.php');
exit();
}
session_write_close();
$jsArray = array();
require_once("includes/header.php");

0 comments on commit f854cee

Please sign in to comment.
You can’t perform that action at this time.