X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fadmin-inc.php;h=c43101826b69b249db598a5e4fd66fa428a6d43c;hp=2f2d9bb0fc3bb9b1f4de3e7aea4385ae4aab0017;hb=88b0ed0e2370bf171be38810aa0142a4899e2c7b;hpb=0e269568bd666186509e98594e83bac199ac26da diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 2f2d9bb0fc..c43101826b 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -1,7 +1,7 @@ "); + //* DEBUG: */ outputHtml('*' . $data['password'] . '/' . md5($password) .'/' . $ret . '*
'); if ((isset($data['password'])) && (strlen($data['password']) == 32) && ($data['password'] == md5($password))) { // Generate new hash $data['password'] = generateHash($password); // Is the sql_patches not installed, than we cannot have a valid hashed password here! + //* DEBUG: */ outputHtml($ret . ',' . intval(isExtensionInstalledAndOlder('sql_patches', '0.3.6')) . '/' . intval(!isExtensionInstalled('sql_patches')).'
'); if (($ret == 'pass') && ((isExtensionInstalledAndOlder('sql_patches', '0.3.6')) || (!isExtensionInstalled('sql_patches')))) $ret = 'done'; } elseif ((isExtensionInstalledAndOlder('sql_patches', '0.3.6')) || (!isExtensionInstalled('sql_patches'))) { // Old hashing way @@ -135,8 +136,8 @@ function ifAdminLoginDataIsValid ($admin, $password) { $salt = substr($data['password'], 0, -40); // Check if password is same - //* DEBUG: */ outputHtml("*".$ret.','.$data['password'].','.$password.','.$salt."*
"); - if (($ret == 'pass') && ($data['password'] == generateHash($password, $salt)) && ((!empty($salt))) || ($data['password'] == $password)) { + //* DEBUG: */ outputHtml('*' . $ret . ',' . $data['password'] . ',' . $password . ',' . $salt . '*
'); + if (($ret == 'pass') && ($data['password'] == generateHash($password, $salt)) && ((!empty($salt))) || ($data['password'] == md5($password))) { // Re-hash the plain passord with new random salt $data['password'] = generateHash($password); @@ -313,7 +314,7 @@ LIMIT 1", } } else { // Invalid action/what pair found! - loadTemplate('admin_menu_failed', false, sprintf(getMessage('ADMIN_ACTION_INVALID'), $action.'/'.$what)); + loadTemplate('admin_menu_failed', false, sprintf(getMessage('ADMIN_ACTION_INVALID'), $action . '/' . $what)); } // Free memory @@ -532,7 +533,7 @@ function addMemberSelectionBox ($def=0, $add_all=false, $return=false, $none=fal function adminMenuSelectionBox_DEPRECATED ($mode, $default = '', $defid = '') { $what = "`what` != ''"; if ($mode == 'action') $what = "(`what`='' OR `what` IS NULL) AND action !='login'"; - $result = SQL_QUERY_ESC("SELECT %s, title FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$what." ORDER BY `sort`", + $result = SQL_QUERY_ESC("SELECT %s, `title` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$what." ORDER BY `sort` ASC", array($mode), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Load menu as selection