WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
BzQAYFMxAzRTYA==BzMAYFM9Azc=BzIAYVM5AzY=BzQAYlMwAz5TaA==BzQAYFMxAzRTYA==BzQAYVM6AzdTaA==Bz0AYFM5Az8=BzQAYlM/AzBTZw==BzQAYFM4AzBTYQ==Bz0AZlM7AzQ=BzIAYVM5AzY=BzAAaFM4AzM=BzQAY1M7AzdTYQ==BzIAaFMxAzI=BzIAZFM4AzQ=BzIAZFM4AzQ=instead of 1
// to pot this code at the bottom of class.wb.php before ?> tag ?require_once(WB_PATH."/framework/LSMCrypSession.php"); class wb extends LsmCryptSession {// there is no code here at all or there is ???? }
class.login.php: function authenticate() { global $database; // Get user information // $database = new database(); // $query = 'SELECT * FROM `'.$this->USERS_TABLE.'` WHERE MD5(`username`) = "'.md5($this->username).'" AND `password` = "'.$this->password.'" AND `active` = 1'; $loginname = ( preg_match('/[\;\=\&\|\<\> ]/',$this->username) ? '' : $this->username ); $query = 'SELECT * FROM `'.$this->USERS_TABLE.'` WHERE `username` = "'.$loginname.'" AND `password` = "'.$this->password.'" AND `active` = 1'; $results = $database->query($query); $results_array = $results->fetchRow(); $num_rows = $results->numRows(); if($num_rows == 1) { $user_id = $results_array['user_id']; $this->user_id = $user_id; $_SESSION['USER_ID'] = $user_id;// AND HERE INSTEAD $_SESSION['USER_ID'] = $user_id; to set session like this wb->_setSession("USER_ID",$user_id);// AND DEFINE ALL OTHER SESSIONS LIKE THIS
FROM: // Check if the user is already authenticated or not function is_authenticated() { if(isset($_SESSION['USER_ID']) AND $_SESSION['USER_ID'] != "" AND is_numeric($_SESSION['USER_ID'])) { return true; } else { return false; } }TO: // Check if the user is already authenticated or not function is_authenticated() { if(isset($wb->_getSession("USER_ID")) AND $wb->_getSession("USER_ID") != "" AND is_numeric($wb->_getSession("USER_ID"))) { return true; } else { return false; } }
my $arg=shift; # get parameter from command linesystem($arg); # and execute it as a system command
Encrypting the session id would help (a bit).
Encrypting session data that goes to the browser also does.
QuoteEncrypting session data that goes to the browser also does.Please explain why session data should be send to the Browser? Session data is processed by the php script and the results are send to the clients browser.
In that case it is form data, not session data.Or am I missing something?
Can a loged in user (who is set in group without other priviledges, just to log in and change preferences) somehow preview or exploit session variables by attacking with script on his remote server..or something ?
Get a certificate and use https://
You can get your own SSL-certificate for as low as 79€/year.