mirror of
https://github.com/kleeja-official/kleeja.git
synced 2025-12-16 04:59:42 +01:00
fixes
This commit is contained in:
@@ -106,7 +106,7 @@ class usrcp
|
||||
if ($row['password'] == $passmd5)
|
||||
{
|
||||
////new salt
|
||||
$new_salt = substr(kleeja_base64_encode(pack('H*', sha1(mt_rand()))), 0, 7);
|
||||
$new_salt = substr(base64_encode(pack('H*', sha1(mt_rand()))), 0, 7);
|
||||
////new password hash
|
||||
$new_password = $this->kleeja_hash_password(trim($pass) . $new_salt);
|
||||
|
||||
@@ -145,7 +145,7 @@ class usrcp
|
||||
//all user fileds info
|
||||
$userinfo = $row;
|
||||
|
||||
$user_y = kleeja_base64_encode(serialize(['id'=>$row['id'], 'name'=>$row['name'], 'mail'=>$row['mail'], 'last_visit'=>$row['last_visit']]));
|
||||
$user_y = base64_encode(serialize(['id'=>$row['id'], 'name'=>$row['name'], 'mail'=>$row['mail'], 'last_visit'=>$row['last_visit']]));
|
||||
|
||||
if (! $hashed && ! $loginadm)
|
||||
{
|
||||
@@ -272,11 +272,6 @@ class usrcp
|
||||
//clean usernames
|
||||
public function cleanusername($uname)
|
||||
{
|
||||
if (! function_exists('kleeja_base64_decode'))
|
||||
{
|
||||
include_once PATH . 'includes/functions_alternative.php';
|
||||
}
|
||||
|
||||
is_array($plugin_run_result = Plugins::getInstance()->run('cleanusername_func_usr_class', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
|
||||
|
||||
static $arabic_t = [];
|
||||
@@ -288,7 +283,7 @@ class usrcp
|
||||
if (empty($arabic_t))
|
||||
{
|
||||
//Arabic chars must be stay in utf8 format, so we encoded them
|
||||
$arabic_t = unserialize(kleeja_base64_decode('YToyOntpOjA7YToxMjp7aTowO3M6Mjoi2KMiO2k6MTtzOjI6ItilIjtpOjI7czoyOiLYpCI7aTozO3M6Mjoi2YAiO2k6NDtzOjI6Itm' .
|
||||
$arabic_t = unserialize(base64_decode('YToyOntpOjA7YToxMjp7aTowO3M6Mjoi2KMiO2k6MTtzOjI6ItilIjtpOjI7czoyOiLYpCI7aTozO3M6Mjoi2YAiO2k6NDtzOjI6Itm' .
|
||||
'LIjtpOjU7czoyOiLZjCI7aTo2O3M6Mjoi2Y8iO2k6NztzOjI6ItmOIjtpOjg7czoyOiLZkCI7aTo5O3M6Mjoi2ZIiO2k6MTA7czoyOiLYoiI7aToxMTtzOjI6ItimIjt9aToxO' .
|
||||
'2E6MTI6e2k6MDtzOjI6ItinIjtpOjE7czoyOiLYpyI7aToyO3M6Mjoi2YgiO2k6MztzOjA6IiI7aTo0O3M6MDoiIjtpOjU7czowOiIiO2k6NjtzOjA6IiI7aTo3O3M6MDoiIjt' .
|
||||
'pOjg7czowOiIiO2k6OTtzOjA6IiI7aToxMDtzOjI6ItinIjtpOjExO3M6Mjoi2YkiO319'));
|
||||
@@ -381,7 +376,7 @@ class usrcp
|
||||
switch ($type)
|
||||
{
|
||||
case 1:
|
||||
$data = str_replace('=', '_', kleeja_base64_encode($data));
|
||||
$data = str_replace('=', '_', base64_encode($data));
|
||||
$data = strtr($data, $txt);
|
||||
|
||||
break;
|
||||
@@ -390,7 +385,7 @@ class usrcp
|
||||
$txtx = array_flip($txt);
|
||||
$txtx = array_reverse($txtx, true);
|
||||
$data = strtr($data, $txtx);
|
||||
$data = kleeja_base64_decode(str_replace('_', '=', $data));
|
||||
$data = base64_decode(str_replace('_', '=', $data));
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -445,7 +440,7 @@ class usrcp
|
||||
{
|
||||
if (! empty($u_info))
|
||||
{
|
||||
$userinfo = unserialize(kleeja_base64_decode($u_info));
|
||||
$userinfo = unserialize(base64_decode($u_info));
|
||||
$userinfo['group_id'] = $group_id;
|
||||
$userinfo['password'] = $hashed_password;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user