Rip out sessions, they don't work cross domain. Rely on information received previously. Sessions will not extend past the current browser session most likely.
This commit is contained in:
parent
a490412f6b
commit
75de51ec14
7 changed files with 157 additions and 167 deletions
|
@ -73,6 +73,4 @@ function gen_uuid()
|
|||
mt_rand(0, 0xffff)
|
||||
);
|
||||
}
|
||||
|
||||
session_start();
|
||||
?>
|
|
@ -34,7 +34,6 @@ if($clientKey == CLIENTPSK) {
|
|||
|
||||
if(md5($password.":" . $pwSalt) == $pwHash) {
|
||||
// Login Success
|
||||
$_SESSION['login'] = "1";
|
||||
$id = $row['UUID'];
|
||||
$first = $row['FirstName'];
|
||||
$last = $row['LastName'];
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
if(!defined("COMMON"))
|
||||
require ("Common.php");
|
||||
|
||||
session_destroy();
|
||||
// Edit database?
|
||||
|
||||
die(json_encode(array(
|
||||
"done" => true,
|
||||
|
|
10
php/Ping.php
10
php/Ping.php
|
@ -20,13 +20,6 @@ if(!defined("CLIENTPSK")) {
|
|||
// Authorized. Send the PSK value to the client
|
||||
$allow=true;
|
||||
$psk = PSK;
|
||||
|
||||
// Check session
|
||||
if(isset($_SESSION['login'])) {
|
||||
$logged_in = true;
|
||||
$user = $_SESSION['user'];
|
||||
$display_name = $_SESSION['display_name'];
|
||||
}
|
||||
}else {
|
||||
$allow=false;
|
||||
}
|
||||
|
@ -42,10 +35,7 @@ if(!defined("CLIENTPSK")) {
|
|||
$ret = array(
|
||||
"type" => "S2CPong",
|
||||
"authorized" => $allow,
|
||||
"user" => $user,
|
||||
"display_name" => $display_name,
|
||||
"psk" => $psk,
|
||||
"login" => $logged_in,
|
||||
"user_count" => $totalUsers
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue