mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-11 00:18:25 +01:00
Fixed appsessions() not returning the users password correctly
This commit is contained in:
parent
8b5f954c1c
commit
ab36b7bb85
@ -179,7 +179,8 @@
|
||||
{
|
||||
global $phpgw_info, $phpgw;
|
||||
|
||||
$this->login = $login;
|
||||
$this->login = $login;
|
||||
$this->passwd = $passwd;
|
||||
$this->clean_sessions();
|
||||
$login_array = explode('@', $login);
|
||||
$this->account_lid = $login_array[0];
|
||||
@ -250,7 +251,7 @@
|
||||
}
|
||||
|
||||
// If they are not useing cache, we need to store it somewhere
|
||||
$this->passwd = $this->appsession('password','phpgwapi',$passwd);
|
||||
$this->appsession('password','phpgwapi',$this->passwd);
|
||||
|
||||
$phpgw->db->query("insert into phpgw_sessions values ('" . $this->sessionid
|
||||
. "','".$login."','" . $this->getuser_ip() . "','"
|
||||
@ -357,10 +358,13 @@
|
||||
." and app = '".$appname."' and location = '".$location."'";
|
||||
|
||||
$phpgw->db->query($query,__LINE__,__FILE__);
|
||||
|
||||
$phpgw->db->next_record();
|
||||
|
||||
// I added these into seperate steps for easier debugging
|
||||
$data = $phpgw->db->f('content');
|
||||
#$data = $phpgw->common->decrypt($data);
|
||||
$data = $phpgw->common->decrypt($data);
|
||||
$data = stripslashes($data);
|
||||
|
||||
return $data;
|
||||
} else {
|
||||
$phpgw->db->query("select content from phpgw_app_sessions where "
|
||||
@ -368,23 +372,23 @@
|
||||
. "and app = '".$appname."' and location = '".$location."'",__LINE__,__FILE__);
|
||||
|
||||
if ($phpgw->db->num_rows()==0) {
|
||||
# some how the next line is not working correctly! knecke
|
||||
# $data = addslashes($phpgw->crypto->encrypt(serialize($data)));
|
||||
$data = addslashes(serialize($data));
|
||||
|
||||
// I added these into seperate steps for easier debugging
|
||||
$data = serialize($data);
|
||||
$data = $phpgw->crypto->encrypt($data);
|
||||
|
||||
$phpgw->db->query("INSERT INTO phpgw_app_sessions (sessionid,loginid,app,location,content) "
|
||||
. "VALUES ('".$this->sessionid."','".$this->account_id."','".$appname
|
||||
. "','".$location."','".$data."')",__LINE__,__FILE__);
|
||||
} else {
|
||||
# some how the next line is not working correctly! knecke
|
||||
# $data = addslashes($phpgw->crypto->encrypt(serialize($data)));
|
||||
$data = addslashes(serialize($data));
|
||||
$data = $phpgw->crypto->encrypt(serialize($data));
|
||||
$phpgw->db->query("update phpgw_app_sessions set content = '".$data."'"
|
||||
. "where sessionid = '".$this->sessionid."'"
|
||||
. "and loginid = '".$this->account_id."' and app = '".$appname."'"
|
||||
. "and location = '".$location."'",__LINE__,__FILE__);
|
||||
}
|
||||
|
||||
return $data;
|
||||
return unserialize($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user