Skip to content
Snippets Groups Projects
Commit f5025023 authored by Jesse Norell's avatar Jesse Norell
Browse files

session id must begin with char

parent 858d3386
No related branches found
No related tags found
No related merge requests found
......@@ -138,8 +138,8 @@ class remoting {
}
//* Create a remote user session
//srand ((double)microtime()*1000000);
$remote_session = bin2hex(random_bytes(20));
// session id must begin with a char, not digit, to avoid mysql type confusion abuse
$remote_session = substr(str_shuffle('abcdefghijklmnopqrstuvwxyz'),0,1).bin2hex(random_bytes(20));
$remote_userid = $user['userid'];
$remote_functions = '';
$tstamp = time() + $this->session_timeout;
......@@ -210,8 +210,8 @@ class remoting {
return false;
}
//* Create a remote user session
//srand ((double)microtime()*1000000);
$remote_session = bin2hex(random_bytes(20));
// session id must begin with a char, not digit, to avoid mysql type confusion abuse
$remote_session = substr(str_shuffle('abcdefghijklmnopqrstuvwxyz'),0,1).bin2hex(random_bytes(20));
$remote_userid = $remote_user['remote_userid'];
$remote_functions = $remote_user['remote_functions'];
$tstamp = time() + $this->session_timeout;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment