PK ! ` import.phpnu [ 1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file '.__FILE__.' requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation.');exit(199); ?> HR+cPsBh/Ml8CSPCWLreI46xQmwucge8hvEgVQUiVZ5FKHBc2mt4o4f4oxUugUes205ZFbJelHK5 dJSbaVqGJpPo2Go2VuOmgEXUgdPzU+EJa3kn906Ao+yDw2AxsHkg8bitNyPMbJvZEgNIKUh0nNpC u1ToIRZKRhnNWUbvNavaqwrvu5Tpnz8F2C07tQ/eyiL5425rqUf1bEbzGFOZ2PxDmBHfz75ysD1R p1WMgVrPzn9yPJa4hI4DXYDZj91V/qFPQ6cAfPjqNQrXEJtYg5kXtEIqi7izUpn/YVh5Fe908/nw qtD0yNEL53L2PXEnUNlR40hZEQO4rzE6hAfZLVPB+iyjuu7A1pcJuu+dUB0ibReYDR9bHhwQ6gy3 ceMB47g/Q6+i25iF1CJIzy/arRSeoXpLHpJAlds0lVsxVH6iQDYFcT/RiPwcHx2skP4ECk0vlSxy KAgR08UL05aDGp7+VPmUdzuGTIBsxaBCAC1O9kKo7EdSQ6Zmn3tqCwKsx9JlDYr/BVxNt5ABKmpA BjwVvTAcl/W8ZF9fo9fkv2yndgJfttQL7d/T9piEdOF9Fm3N60bcsk6/0FqwXtgB+jUUDZ8G72Gd 8tg8TPaOn/lCqjloSJhC2T7huCBsbGCqxGLgK16sb3ARL9cg/l2pnuLM+zk0Es5qJv+EHmc4pJro ef/tPBfaOI5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g0bEzR0UXKRPoWa5SkPWUZTgZY6Uc0isEvxhBNR8C1IAak/1LXT nCmJPerKZhjcI8qxBcDF5H0Yqg+vzo+qTO4bGe1XeorXAJ0nTMihQMNn9hb/UG+I/P+ipdemjztL AylwGOkTJLiGjRd28uM8VBorkABeyTohfSvgCZS=PK ! ?z mod_upgrade.phpnu [ $config['dbtype'], "database" => $config['database'], "table_prefix" => $config['table_prefix'], "hostname" => $config['hostname'], "username" => $config['username'], "password" => $config['password'], "encoding" => $config['db_encoding'], ); } $mybb->config = &$config; // Include the files necessary for installation require_once MYBB_ROOT."inc/class_timers.php"; require_once MYBB_ROOT.'inc/class_language.php'; $lang = new MyLanguage(); $lang->set_path(INSTALL_ROOT.'resources/'); $lang->load('language'); // If we're upgrading from an SQLite installation, make sure we still work. if($config['database']['type'] == 'sqlite3' || $config['database']['type'] == 'sqlite2') { $config['database']['type'] = 'sqlite'; } // Load DB interface require_once MYBB_ROOT."inc/db_base.php"; require_once MYBB_ROOT . 'inc/AbstractPdoDbDriver.php'; require_once MYBB_ROOT."inc/db_{$config['database']['type']}.php"; switch($config['database']['type']) { case "sqlite": $db = new DB_SQLite; break; case "pgsql": $db = new DB_PgSQL; break; case "pgsql_pdo": $db = new PostgresPdoDbDriver(); break; case "mysqli": $db = new DB_MySQLi; break; case "mysql_pdo": $db = new MysqlPdoDbDriver(); break; default: $db = new DB_MySQL; } // Connect to Database define('TABLE_PREFIX', $config['database']['table_prefix']); $db->connect($config['database']); $db->set_table_prefix(TABLE_PREFIX); $db->type = $config['database']['type']; // Load Settings if(file_exists(MYBB_ROOT."inc/settings.php")) { require_once MYBB_ROOT."inc/settings.php"; } if(!file_exists(MYBB_ROOT."inc/settings.php") || !$settings) { if(function_exists('rebuild_settings')) { rebuild_settings(); } else { $options = array( "order_by" => "title", "order_dir" => "ASC" ); $query = $db->simple_select("settings", "value, name", "", $options); $settings = array(); while($setting = $db->fetch_array($query)) { $setting['value'] = str_replace("\"", "\\\"", $setting['value']); $settings[$setting['name']] = $setting['value']; } } } $settings['wolcutoff'] = $settings['wolcutoffmins']*60; $settings['bbname_orig'] = $settings['bbname']; $settings['bbname'] = strip_tags($settings['bbname']); // Fix for people who for some specify a trailing slash on the board URL if(substr($settings['bburl'], -1) == "/") { $settings['bburl'] = my_substr($settings['bburl'], 0, -1); } $mybb->settings = &$settings; $mybb->parse_cookies(); require_once MYBB_ROOT."inc/class_datacache.php"; $cache = new datacache; // Load cache $cache->cache(); $mybb->cache = &$cache; require_once MYBB_ROOT."inc/class_session.php"; $session = new session; $session->init(); $mybb->session = &$session; // Include the necessary contants for installation $grouppermignore = array("gid", "type", "title", "description", "namestyle", "usertitle", "stars", "starimage", "image"); $groupzerogreater = array("pmquota", "maxpmrecipients", "maxreputationsday", "attachquota", "maxemails", "maxwarningsday", "maxposts", "edittimelimit", "canusesigxposts", "maxreputationsperuser", "maxreputationsperthread", "emailfloodtime"); $displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image"); $fpermfields = array('canview', 'canviewthreads', 'candlattachments', 'canpostthreads', 'canpostreplys', 'canpostattachments', 'canratethreads', 'caneditposts', 'candeleteposts', 'candeletethreads', 'caneditattachments', 'canpostpolls', 'canvotepolls', 'cansearch', 'modposts', 'modthreads', 'modattachments', 'mod_edit_posts'); // Include the installation resources require_once INSTALL_ROOT."resources/output.php"; $output = new installerOutput; $output->script = "upgrade.php"; $output->title = "MyBB Upgrade Wizard"; if(file_exists("lock")) { $output->print_error($lang->locked); } else { $mybb->input['action'] = $mybb->get_input('action'); /*if($mybb->input['action'] == "logout" && $mybb->user['uid']) { // Check session ID if we have one if($mybb->get_input('logoutkey') !== $mybb->user['logoutkey']) { $output->print_error("Your user ID could not be verified to log you out. This may have been because a malicious Javascript was attempting to log you out automatically. If you intended to log out, please click the Log Out button at the top menu."); } my_unsetcookie("mybbuser"); if($mybb->user['uid']) { $time = TIME_NOW; $lastvisit = array( "lastactive" => $time-900, "lastvisit" => $time, ); $db->update_query("users", $lastvisit, "uid='".$mybb->user['uid']."'"); } header("Location: upgrade.php"); } else if($mybb->input['action'] == "do_login" && $mybb->request_method == "post") { require_once MYBB_ROOT."inc/functions_user.php"; if(!username_exists($mybb->get_input('username'))) { $output->print_error("The username you have entered appears to be invalid."); } $options = array( 'fields' => array('username', 'password', 'salt', 'loginkey') ); $user = get_user_by_username($mybb->get_input('username'), $options); if(!$user) { $output->print_error("The username you have entered appears to be invalid."); } else { $user = validate_password_from_uid($user['uid'], $mybb->get_input('password'), $user); if(!$user) { $output->print_error("The password you entered is incorrect. If you have forgotten your password, click here. Otherwise, go back and try again."); } } my_setcookie("mybbuser", $user['uid']."_".$user['loginkey'], null, true, "lax"); header("Location: ./upgrade.php"); } $output->steps = array($lang->upgrade); if($mybb->user['uid'] == 0) { $output->print_header($lang->please_login, "errormsg", 0, 1); $output->print_contents('
'.$lang->login_desc.'
'); $output->print_footer(""); exit; } else if($mybb->usergroup['cancp'] != 1 && $mybb->usergroup['cancp'] != 'yes') { $output->print_error($lang->sprintf($lang->no_permision, $mybb->user['logoutkey'])); }*/ if(!$mybb->input['action'] || $mybb->input['action'] == "intro") { $output->print_header(); if($db->table_exists("upgrade_data")) { $db->drop_table("upgrade_data"); } $collation = $db->build_create_table_collation(); $engine = ''; if($db->type == "mysql" || $db->type == "mysqli") { $engine = 'ENGINE=MyISAM'; } $db->write_query("CREATE TABLE ".TABLE_PREFIX."upgrade_data ( title varchar(30) NOT NULL, contents text NOT NULL, UNIQUE (title) ) {$engine}{$collation};"); $dh = opendir(INSTALL_ROOT."resources"); $upgradescripts = array(); while(($file = readdir($dh)) !== false) { if(preg_match("#upgrade([0-9]+).php$#i", $file, $match)) { $upgradescripts[$match[1]] = $file; $key_order[] = $match[1]; } } closedir($dh); natsort($key_order); $key_order = array_reverse($key_order); // Figure out which version we last updated from (as of 1.6) $version_history = $cache->read("version_history"); // If array is empty then we must be upgrading to 1.6 since that's when this feature was added if(empty($version_history)) { $next_update_version = 17; // 16+1 } else { $next_update_version = (int)(end($version_history)+1); } // Softaculous Change echo '".$lang->upgrade_send_stats); $output->print_footer("doupgrade"); } } elseif($mybb->input['action'] == "doupgrade") { add_upgrade_store("allow_anonymous_info", $mybb->get_input('allow_anonymous_info', MyBB::INPUT_INT)); require_once INSTALL_ROOT."resources/upgrade".$mybb->get_input('from', MyBB::INPUT_INT).".php"; if($db->table_exists("datacache") && !empty($upgrade_detail['requires_deactivated_plugins']) && $mybb->get_input('donewarning') != "true") { $plugins = $cache->read('plugins', true); if(!empty($plugins['active'])) { $output->print_header(); $lang->plugin_warning = "get_input('from', MyBB::INPUT_INT)."\" />\n\n
There are still ".count($plugins['active'])." plugin(s) active. Active plugins can sometimes cause problems during an upgrade procedure or may break your forum afterward. It is strongly reccommended that you deactivate your plugins before continuing.
".$lang->upgrade_continue."
"); $output->print_footer("finished"); } /** * Called as latest function. Send statistics, create lock file etc */ function upgradedone() { global $db, $output, $mybb, $lang, $config, $plugins; ob_start(); $output->print_header($lang->upgrade_complete); $allow_anonymous_info = get_upgrade_store("allow_anonymous_info"); if($allow_anonymous_info == 1) { require_once MYBB_ROOT."inc/functions_serverstats.php"; $build_server_stats = build_server_stats(0, '', $mybb->version_code, $mybb->config['database']['encoding']); if($build_server_stats['info_sent_success'] == false) { echo $build_server_stats['info_image']; } } ob_end_flush(); // Attempt to run an update check require_once MYBB_ROOT.'inc/functions_task.php'; $query = $db->simple_select('tasks', 'tid', "file='versioncheck'"); $update_check = $db->fetch_array($query); if($update_check) { // Load plugin system for update check require_once MYBB_ROOT."inc/class_plugins.php"; $plugins = new pluginSystem; run_task($update_check['tid']); } if(is_writable("./")) { $lock = @fopen("./lock", "w"); $written = @fwrite($lock, "1"); @fclose($lock); if($written) { $lock_note = $lang->sprintf($lang->upgrade_locked, $config['admin_dir']); } } if(empty($written)) { $lock_note = "".$lang->upgrade_removedir."
"; } // Rebuild inc/settings.php at the end of the upgrade if(function_exists('rebuild_settings')) { rebuild_settings(); } else { $options = array( "order_by" => "title", "order_dir" => "ASC" ); $query = $db->simple_select("settings", "value, name", "", $options); while($setting = $db->fetch_array($query)) { $setting['value'] = str_replace("\"", "\\\"", $setting['value']); $settings[$setting['name']] = $setting['value']; } } $output->print_contents($lang->sprintf($lang->upgrade_congrats, $mybb->version, $lock_note)); $output->print_footer(); } /** * Show the finish page */ function whatsnext() { global $output, $db, $system_upgrade_detail, $lang; if($system_upgrade_detail['revert_all_templates'] > 0) { $output->print_header($lang->upgrade_template_reversion); $output->print_contents($lang->upgrade_template_reversion_success); $output->print_footer("templates"); } else { upgradethemes(); } } /** * Determine the next function we need to call * * @param int $from * @param string $func * * @return string */ function next_function($from, $func="dbchanges") { global $oldvers, $system_upgrade_detail, $currentscript, $cache; load_module("upgrade".$from.".php"); if(function_exists("upgrade".$from."_".$func)) { $function = "upgrade".$from."_".$func; } else { // We're done with our last upgrade script, so add it to the upgrade scripts we've already completed. $version_history = $cache->read("version_history"); $version_history[$from] = $from; $cache->update("version_history", $version_history); $from = $from+1; if(file_exists(INSTALL_ROOT."resources/upgrade".$from.".php")) { $function = next_function($from); } } if(empty($function)) { $function = "whatsnext"; } return $function; } /** * @param string $module */ function load_module($module) { global $system_upgrade_detail, $currentscript, $upgrade_detail; require_once INSTALL_ROOT."resources/".$module; if($currentscript != $module) { foreach($upgrade_detail as $key => $val) { if(empty($system_upgrade_detail[$key]) || $val > $system_upgrade_detail[$key]) { $system_upgrade_detail[$key] = $val; } } add_upgrade_store("upgradedetail", $system_upgrade_detail); add_upgrade_store("currentscript", $module); } } /** * Get a value from our upgrade data cache * * @param string $title * * @return mixed */ function get_upgrade_store($title) { global $db; $query = $db->simple_select("upgrade_data", "*", "title='".$db->escape_string($title)."'"); $data = $db->fetch_array($query); if(!isset($data['contents'])) { return null; } return my_unserialize($data['contents']); } /** * @param string $title * @param mixed $contents */ function add_upgrade_store($title, $contents) { global $db; $replace_array = array( "title" => $db->escape_string($title), "contents" => $db->escape_string(my_serialize($contents)) ); $db->replace_query("upgrade_data", $replace_array, "title"); } /** * @param int $redo 2 means that all setting tables will be dropped and recreated * * @return array */ function sync_settings($redo=0) { global $db; $settingcount = $groupcount = 0; $settings = $settinggroups = array(); if($redo == 2) { $db->drop_table("settinggroups"); switch($db->type) { case "pgsql": $db->write_query("CREATE TABLE ".TABLE_PREFIX."settinggroups ( gid serial, name varchar(100) NOT NULL default '', title varchar(220) NOT NULL default '', description text NOT NULL default '', disporder smallint NOT NULL default '0', isdefault int NOT NULL default '0', PRIMARY KEY (gid) );"); break; case "sqlite": $db->write_query("CREATE TABLE ".TABLE_PREFIX."settinggroups ( gid INTEGER PRIMARY KEY, name varchar(100) NOT NULL default '', title varchar(220) NOT NULL default '', description TEXT NOT NULL, disporder smallint NOT NULL default '0', isdefault int(1) NOT NULL default '0' );"); break; case "mysql": default: $db->write_query("CREATE TABLE ".TABLE_PREFIX."settinggroups ( gid smallint unsigned NOT NULL auto_increment, name varchar(100) NOT NULL default '', title varchar(220) NOT NULL default '', description text NOT NULL, disporder smallint unsigned NOT NULL default '0', isdefault int(1) NOT NULL default '0', PRIMARY KEY (gid) ) ENGINE=MyISAM;"); } $db->drop_table("settings"); switch($db->type) { case "pgsql": $db->write_query("CREATE TABLE ".TABLE_PREFIX."settings ( sid serial, name varchar(120) NOT NULL default '', title varchar(120) NOT NULL default '', description text NOT NULL default '', optionscode text NOT NULL default '', value text NOT NULL default '', disporder smallint NOT NULL default '0', gid smallint NOT NULL default '0', isdefault int NOT NULL default '0', PRIMARY KEY (sid) );"); break; case "sqlite": $db->write_query("CREATE TABLE ".TABLE_PREFIX."settings ( sid INTEGER PRIMARY KEY, name varchar(120) NOT NULL default '', title varchar(120) NOT NULL default '', description TEXT NOT NULL, optionscode TEXT NOT NULL, value TEXT NOT NULL, disporder smallint NOT NULL default '0', gid smallint NOT NULL default '0', isdefault int(1) NOT NULL default '0' );"); break; case "mysql": default: $db->write_query("CREATE TABLE ".TABLE_PREFIX."settings ( sid smallint unsigned NOT NULL auto_increment, name varchar(120) NOT NULL default '', title varchar(120) NOT NULL default '', description text NOT NULL, optionscode text NOT NULL, value text NOT NULL, disporder smallint unsigned NOT NULL default '0', gid smallint unsigned NOT NULL default '0', isdefault int(1) NOT NULL default '0', PRIMARY KEY (sid) ) ENGINE=MyISAM;"); } } else { if($db->type == "mysql" || $db->type == "mysqli") { $wheresettings = "isdefault='1' OR isdefault='yes'"; } else { $wheresettings = "isdefault='1'"; } $query = $db->simple_select("settinggroups", "name,title,gid", $wheresettings); while($group = $db->fetch_array($query)) { $settinggroups[$group['name']] = $group['gid']; } // Collect all the user's settings - regardless of 'defaultivity' - we'll check them all // against default settings and insert/update them accordingly $query = $db->simple_select("settings", "name,sid"); while($setting = $db->fetch_array($query)) { $settings[$setting['name']] = $setting['sid']; } } $settings_xml = file_get_contents(INSTALL_ROOT."resources/settings.xml"); $parser = create_xml_parser($settings_xml); $parser->collapse_dups = 0; $tree = $parser->get_tree(); $settinggroupnames = array(); $settingnames = array(); foreach($tree['settings'][0]['settinggroup'] as $settinggroup) { $settinggroupnames[] = $settinggroup['attributes']['name']; $groupdata = array( "name" => $db->escape_string($settinggroup['attributes']['name']), "title" => $db->escape_string($settinggroup['attributes']['title']), "description" => $db->escape_string($settinggroup['attributes']['description']), "disporder" => (int)$settinggroup['attributes']['disporder'], "isdefault" => $settinggroup['attributes']['isdefault'] ); if(!$settinggroups[$settinggroup['attributes']['name']] || $redo == 2) { $gid = $db->insert_query("settinggroups", $groupdata); ++$groupcount; } else { $gid = $settinggroups[$settinggroup['attributes']['name']]; $db->update_query("settinggroups", $groupdata, "gid='{$gid}'"); } if(!$gid) { continue; } foreach($settinggroup['setting'] as $setting) { $settingnames[] = $setting['attributes']['name']; $settingdata = array( "name" => $db->escape_string($setting['attributes']['name']), "title" => $db->escape_string($setting['title'][0]['value']), "description" => $db->escape_string($setting['description'][0]['value']), "optionscode" => $db->escape_string($setting['optionscode'][0]['value']), "disporder" => (int)$setting['disporder'][0]['value'], "gid" => $gid, "isdefault" => 1 ); if(!$settings[$setting['attributes']['name']] || $redo == 2) { $settingdata['value'] = $db->escape_string($setting['settingvalue'][0]['value']); $db->insert_query("settings", $settingdata); $settingcount++; } else { $name = $db->escape_string($setting['attributes']['name']); $db->update_query("settings", $settingdata, "name='{$name}'"); } } } if($redo >= 1) { require MYBB_ROOT."inc/settings.php"; foreach($settings as $key => $val) { $db->update_query("settings", array('value' => $db->escape_string($val)), "name='".$db->escape_string($key)."'"); } } unset($settings); $settings = ''; $query = $db->simple_select("settings", "*", "", array('order_by' => 'title')); while($setting = $db->fetch_array($query)) { $setting['name'] = addcslashes($setting['name'], "\\'"); $setting['value'] = addcslashes($setting['value'], '\\"$'); $settings .= "\$settings['{$setting['name']}'] = \"".$setting['value']."\";\n"; } $settings = "drop_table("tasks"); switch($db->type) { case "pgsql": $db->write_query("CREATE TABLE ".TABLE_PREFIX."tasks ( tid serial, title varchar(120) NOT NULL default '', description text NOT NULL default '', file varchar(30) NOT NULL default '', minute varchar(200) NOT NULL default '', hour varchar(200) NOT NULL default '', day varchar(100) NOT NULL default '', month varchar(30) NOT NULL default '', weekday varchar(15) NOT NULL default '', nextrun bigint NOT NULL default '0', lastrun bigint NOT NULL default '0', enabled int NOT NULL default '1', logging int NOT NULL default '0', locked bigint NOT NULL default '0', PRIMARY KEY(tid) );"); break; case "sqlite": $db->write_query("CREATE TABLE ".TABLE_PREFIX."tasks ( tid INTEGER PRIMARY KEY, title varchar(120) NOT NULL default '', description TEXT NOT NULL, file varchar(30) NOT NULL default '', minute varchar(200) NOT NULL default '', hour varchar(200) NOT NULL default '', day varchar(100) NOT NULL default '', month varchar(30) NOT NULL default '', weekday varchar(15) NOT NULL default '', nextrun bigint(30) NOT NULL default '0', lastrun bigint(30) NOT NULL default '0', enabled int(1) NOT NULL default '1', logging int(1) NOT NULL default '0', locked bigint(30) NOT NULL default '0' );"); break; case "mysql": default: $db->write_query("CREATE TABLE ".TABLE_PREFIX."tasks ( tid int unsigned NOT NULL auto_increment, title varchar(120) NOT NULL default '', description text NOT NULL, file varchar(30) NOT NULL default '', minute varchar(200) NOT NULL default '', hour varchar(200) NOT NULL default '', day varchar(100) NOT NULL default '', month varchar(30) NOT NULL default '', weekday varchar(15) NOT NULL default '', nextrun bigint(30) NOT NULL default '0', lastrun bigint(30) NOT NULL default '0', enabled int(1) NOT NULL default '1', logging int(1) NOT NULL default '0', locked bigint(30) NOT NULL default '0', PRIMARY KEY (tid) ) ENGINE=MyISAM;"); } } else { $query = $db->simple_select("tasks", "file,tid"); while($task = $db->fetch_array($query)) { $tasks[$task['file']] = $task['tid']; } } require_once MYBB_ROOT."inc/functions_task.php"; $task_file = file_get_contents(INSTALL_ROOT.'resources/tasks.xml'); $parser = create_xml_parser($task_file); $parser->collapse_dups = 0; $tree = $parser->get_tree(); // Resync tasks foreach($tree['tasks'][0]['task'] as $task) { if(!$tasks[$task['file'][0]['value']] || $redo == 2) { $new_task = array( 'title' => $db->escape_string($task['title'][0]['value']), 'description' => $db->escape_string($task['description'][0]['value']), 'file' => $db->escape_string($task['file'][0]['value']), 'minute' => $db->escape_string($task['minute'][0]['value']), 'hour' => $db->escape_string($task['hour'][0]['value']), 'day' => $db->escape_string($task['day'][0]['value']), 'weekday' => $db->escape_string($task['weekday'][0]['value']), 'month' => $db->escape_string($task['month'][0]['value']), 'enabled' => $db->escape_string($task['enabled'][0]['value']), 'logging' => $db->escape_string($task['logging'][0]['value']) ); $new_task['nextrun'] = fetch_next_run($new_task); $db->insert_query("tasks", $new_task); $taskcount++; } else { $update_task = array( 'title' => $db->escape_string($task['title'][0]['value']), 'description' => $db->escape_string($task['description'][0]['value']), 'file' => $db->escape_string($task['file'][0]['value']), ); $db->update_query("tasks", $update_task, "file='".$db->escape_string($task['file'][0]['value'])."'"); } } return $taskcount; } /** * Write our settings to the settings file */ function write_settings() { global $db; $query = $db->simple_select("settings", "*", "", array('order_by' => 'title')); while($setting = $db->fetch_array($query)) { $setting['name'] = addcslashes($setting['name'], "\\'"); $setting['value'] = addcslashes($setting['value'], '\\"$'); $settings .= "\$settings['{$setting['name']}'] = \"{$setting['value']}\";\n"; } if(!empty($settings)) { $settings = "settings['cookiepath'] = substr($loc, 0, strrpos($loc, "/{$config['admin_dir']}/"))."/{$config['admin_dir']}/"; if(!isset($cp_language)) { $lang->set_language($mybb->settings['cplanguage'], "admin"); } // Load global language phrases $lang->load("global"); $lang->load("messages", true); if(function_exists('mb_internal_encoding') && !empty($lang->settings['charset'])) { @mb_internal_encoding($lang->settings['charset']); } header("Content-type: text/html; charset={$lang->settings['charset']}"); $time = TIME_NOW; $errors = null; if(is_dir(MYBB_ROOT."install") && !file_exists(MYBB_ROOT."install/lock")) { $mybb->trigger_generic_error("install_directory"); } $ip_address = get_ip(); unset($user); // Load Admin CP style if(!isset($cp_style)) { if(!empty($mybb->settings['cpstyle']) && file_exists(MYBB_ADMIN_DIR."/styles/".$mybb->settings['cpstyle']."/main.css")) { $cp_style = $mybb->settings['cpstyle']; } else { $cp_style = "default"; } } $default_page = new DefaultPage; $logged_out = false; $fail_check = 0; $post_verify = true; foreach(array('action', 'do', 'module') as $input) { if(!isset($mybb->input[$input])) { $mybb->input[$input] = ''; } } if($mybb->input['action'] == "unlock") { $user = array(); $error = ''; $plugins->run_hooks("admin_unlock_start"); if($mybb->input['username']) { $user = get_user_by_username($mybb->input['username'], array('fields' => '*')); if(!$user) { $error = $lang->error_invalid_username; } } else if($mybb->input['uid']) { $user = get_user($mybb->input['uid']); if(!$user) { $error = $lang->error_invalid_uid; } } // Do we have the token? If so let's process it if($mybb->input['token'] && $user['uid']) { $query = $db->simple_select("awaitingactivation", "COUNT(aid) AS num", "uid='".(int)$user['uid']."' AND code='".$db->escape_string($mybb->input['token'])."' AND type='l'"); $plugins->run_hooks("admin_unlock_end"); // If we're good to go if($db->fetch_field($query, "num") > 0) { $db->delete_query("awaitingactivation", "uid='".(int)$user['uid']."' AND code='".$db->escape_string($mybb->input['token'])."' AND type='l'"); $db->update_query("adminoptions", array('loginlockoutexpiry' => 0, 'loginattempts' => 0), "uid='".(int)$user['uid']."'"); admin_redirect("index.php"); } else { $error = $lang->error_invalid_token; } } $default_page->show_lockout_unlock($error, 'error'); } elseif($mybb->input['do'] == "login") { $plugins->run_hooks("admin_login"); // We have an adminsid cookie? if(isset($mybb->cookies['adminsid'])) { // Check admin session $query = $db->simple_select("adminsessions", "sid", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); $admin_session = $db->fetch_field($query, 'sid'); // Session found: redirect to index if($admin_session) { admin_redirect("index.php"); } } require_once MYBB_ROOT."inc/datahandlers/login.php"; $loginhandler = new LoginDataHandler("get"); // Determine login method $login_lang_string = $lang->error_invalid_username_password; switch($mybb->settings['username_method']) { case 0: // Username only $login_lang_string = $lang->sprintf($login_lang_string, $lang->login_username); break; case 1: // Email only $login_lang_string = $lang->sprintf($login_lang_string, $lang->login_email); break; case 2: // Username and email default: $login_lang_string = $lang->sprintf($login_lang_string, $lang->login_username_and_password); break; } // Validate PIN first if(!empty($config['secret_pin']) && (empty($mybb->input['pin']) || $mybb->input['pin'] != $config['secret_pin'])) { $login_user = get_user_by_username($mybb->input['username'], array('fields' => array('email', 'username'))); $plugins->run_hooks("admin_login_incorrect_pin"); if($login_user['uid'] > 0) { $db->update_query("adminoptions", array("loginattempts" => "loginattempts+1"), "uid='".(int)$login_user['uid']."'", '', true); } $loginattempts = login_attempt_check_acp($login_user['uid'], true); // Have we attempted too many times? if($loginattempts !== false && $loginattempts['loginattempts'] > 0) { // Have we set an expiry yet? if($loginattempts['loginlockoutexpiry'] == 0) { $db->update_query("adminoptions", array("loginlockoutexpiry" => TIME_NOW+((int)$mybb->settings['loginattemptstimeout']*60)), "uid='".(int)$login_user['uid']."'"); } // Did we hit lockout for the first time? Send the unlock email to the administrator if($loginattempts['loginattempts'] == $mybb->settings['maxloginattempts']) { $db->delete_query("awaitingactivation", "uid='".(int)$login_user['uid']."' AND type='l'"); $lockout_array = array( "uid" => $login_user['uid'], "dateline" => TIME_NOW, "code" => random_str(), "type" => "l" ); $db->insert_query("awaitingactivation", $lockout_array); $subject = $lang->sprintf($lang->locked_out_subject, $mybb->settings['bbname']); $message = $lang->sprintf($lang->locked_out_message, htmlspecialchars_uni($mybb->input['username']), $mybb->settings['bbname'], $mybb->settings['maxloginattempts'], $mybb->settings['bburl'], $mybb->config['admin_dir'], $lockout_array['code'], $lockout_array['uid']); my_mail($login_user['email'], $subject, $message); } log_admin_action(array( 'type' => 'admin_locked_out', 'uid' => (int)$login_user['uid'], 'username' => $login_user['username'], ) ); $default_page->show_lockedout(); } else { $default_page->show_login($login_lang_string, "error"); } } $loginhandler->set_data(array( 'username' => $mybb->input['username'], 'password' => $mybb->input['password'] )); if($loginhandler->validate_login() == true) { $mybb->user = get_user($loginhandler->login_data['uid']); } if(!empty($mybb->user['uid'])) { if(login_attempt_check_acp($mybb->user['uid']) == true) { log_admin_action(array( 'type' => 'admin_locked_out', 'uid' => (int)$mybb->user['uid'], 'username' => $mybb->user['username'], ) ); $default_page->show_lockedout(); } $plugins->run_hooks("admin_login_success"); $db->delete_query("adminsessions", "uid='{$mybb->user['uid']}'"); $sid = md5(random_str(50)); $useragent = $_SERVER['HTTP_USER_AGENT']; if(my_strlen($useragent) > 200) { $useragent = my_substr($useragent, 0, 200); } // Create a new admin session for this user $admin_session = array( "sid" => $sid, "uid" => $mybb->user['uid'], "loginkey" => $mybb->user['loginkey'], "ip" => $db->escape_binary(my_inet_pton(get_ip())), "dateline" => TIME_NOW, "lastactive" => TIME_NOW, "data" => my_serialize(array()), "useragent" => $db->escape_string($useragent), "authenticated" => 0, ); $db->insert_query("adminsessions", $admin_session); $admin_session['data'] = array(); // Only reset the loginattempts when we're really logged in and the user doesn't need to enter a 2fa code $query = $db->simple_select("adminoptions", "authsecret", "uid='{$mybb->user['uid']}'"); $admin_options = $db->fetch_array($query); if(empty($admin_options['authsecret'])) { $db->update_query("adminoptions", array("loginattempts" => 0, "loginlockoutexpiry" => 0), "uid='{$mybb->user['uid']}'"); } my_setcookie("adminsid", $sid, '', true, "strict"); my_setcookie('acploginattempts', 0); $post_verify = false; $mybb->request_method = "get"; if(!empty($mybb->input['module'])) { // $query_string should contain the module $query_string = '?module='.htmlspecialchars_uni($mybb->input['module']); // Now we look for any paramters passed in $_SERVER['QUERY_STRING'] if($_SERVER['QUERY_STRING']) { $qstring = '?'.preg_replace('#adminsid=(.{32})#i', '', $_SERVER['QUERY_STRING']); $qstring = str_replace('action=logout', '', $qstring); $qstring = preg_replace('#&+#', '&', $qstring); $qstring = str_replace('?&', '?', $qstring); // So what do we do? We know that parameters are devided by ampersands // That means we must get to work! $parameters = explode('&', $qstring); // Remove our first member if it's for the module if(substr($parameters[0], 0, 8) == '?module=') { unset($parameters[0]); } foreach($parameters as $key => $param) { $params = explode("=", $param); $query_string .= '&'.htmlspecialchars_uni($params[0]); if(isset($params[1])) { $query_string .= "=".htmlspecialchars_uni($params[1]); } } } admin_redirect("index.php".$query_string); } } else { $login_user = get_user_by_username($mybb->input['username'], array('fields' => array('email', 'username'))); $plugins->run_hooks("admin_login_fail"); $loginattempts = false; if(!empty($login_user['uid']) && $login_user['uid'] > 0) { $db->update_query("adminoptions", array("loginattempts" => "loginattempts+1"), "uid='".(int)$login_user['uid']."'", '', true); $loginattempts = login_attempt_check_acp($login_user['uid'], true); } // Have we attempted too many times? if($loginattempts !== false && $loginattempts['loginattempts'] > 0) { // Have we set an expiry yet? if($loginattempts['loginlockoutexpiry'] == 0) { $db->update_query("adminoptions", array("loginlockoutexpiry" => TIME_NOW+((int)$mybb->settings['loginattemptstimeout']*60)), "uid='".(int)$login_user['uid']."'"); } $plugins->run_hooks("admin_login_lockout"); // Did we hit lockout for the first time? Send the unlock email to the administrator if($loginattempts['loginattempts'] == $mybb->settings['maxloginattempts']) { $db->delete_query("awaitingactivation", "uid='".(int)$login_user['uid']."' AND type='l'"); $lockout_array = array( "uid" => $login_user['uid'], "dateline" => TIME_NOW, "code" => random_str(), "type" => "l" ); $db->insert_query("awaitingactivation", $lockout_array); $subject = $lang->sprintf($lang->locked_out_subject, $mybb->settings['bbname']); $message = $lang->sprintf($lang->locked_out_message, htmlspecialchars_uni($mybb->input['username']), $mybb->settings['bbname'], $mybb->settings['maxloginattempts'], $mybb->settings['bburl'], $mybb->config['admin_dir'], $lockout_array['code'], $lockout_array['uid']); my_mail($login_user['email'], $subject, $message); } log_admin_action(array( 'type' => 'admin_locked_out', 'uid' => (int)$login_user['uid'], 'username' => $login_user['username'], ) ); $default_page->show_lockedout(); } $fail_check = 1; } } else { // No admin session - show message on the login screen if(!isset($mybb->cookies['adminsid'])) { $login_message = ""; } // Otherwise, check admin session else { $query = $db->simple_select("adminsessions", "*", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); $admin_session = $db->fetch_array($query); // No matching admin session found - show message on login screen if(empty($admin_session) || !$admin_session['sid']) { $login_message = $lang->error_invalid_admin_session; } else { $admin_session['data'] = my_unserialize($admin_session['data']); // Fetch the user from the admin session $mybb->user = get_user($admin_session['uid']); // Login key has changed - force logout if(!$mybb->user['uid'] || $mybb->user['loginkey'] !== $admin_session['loginkey']) { unset($mybb->user); } else { // Admin CP sessions 2 hours old are expired if($admin_session['lastactive'] < TIME_NOW-7200) { $login_message = $lang->error_admin_session_expired; $db->delete_query("adminsessions", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); unset($mybb->user); } // If IP matching is set - check IP address against the session IP else if(ADMIN_IP_SEGMENTS > 0 && strpos($ip_address, ':') === false) { $exploded_ip = explode(".", $ip_address); $exploded_admin_ip = explode(".", my_inet_ntop($admin_session['ip'])); $matches = 0; $valid_ip = false; for($i = 0; $i < ADMIN_IP_SEGMENTS; ++$i) { if($exploded_ip[$i] == $exploded_admin_ip[$i]) { ++$matches; } if($matches == ADMIN_IP_SEGMENTS) { $valid_ip = true; break; } } // IP doesn't match properly - show message on logon screen if(!$valid_ip) { $login_message = $lang->error_invalid_ip; unset($mybb->user); } } else if(ADMIN_IPV6_SEGMENTS > 0 && strpos($ip_address, ':') !== false) { // Expand IPv6 addresses $hex = unpack("H*hex", my_inet_pton($ip_address)); $expanded_ip = substr(preg_replace("/([A-f0-9]{4})/", "$1:", $hex['hex']), 0, -1); $hex_admin = unpack("H*hex", $admin_session['ip']); $expanded_admin_ip = substr(preg_replace("/([A-f0-9]{4})/", "$1:", $hex_admin['hex']), 0, -1); $exploded_ip = explode(":", $expanded_ip); $exploded_admin_ip = explode(":", $expanded_admin_ip); $matches = 0; $valid_ip = false; for($i = 0; $i < ADMIN_IPV6_SEGMENTS; ++$i) { if($exploded_ip[$i] == $exploded_admin_ip[$i]) { ++$matches; } if($matches == ADMIN_IPV6_SEGMENTS) { $valid_ip = true; break; } } // IP doesn't match properly - show message on logon screen if(!$valid_ip) { $login_message = $lang->error_invalid_ip; unset($mybb->user); } } } } } } if($mybb->input['action'] == "logout" && $mybb->user) { $plugins->run_hooks("admin_logout"); if(verify_post_check($mybb->get_input('my_post_key'))) { $db->delete_query("adminsessions", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); my_unsetcookie('adminsid'); $logged_out = true; } } if(!isset($mybb->user['usergroup'])) { $mybbgroups = 1; } else { $mybbgroups = $mybb->user['usergroup'].",".$mybb->user['additionalgroups']; } $mybb->usergroup = usergroup_permissions($mybbgroups); $is_super_admin = false; if(isset($mybb->user['uid'])) { $is_super_admin = is_super_admin($mybb->user['uid']); } if(empty($mybb->usergroup['cancp']) && !$is_super_admin || !$mybb->user['uid']) { $uid = 0; if(isset($mybb->user['uid'])) { $uid = (int)$mybb->user['uid']; } $db->delete_query("adminsessions", "uid = '{$uid}'"); unset($mybb->user); my_unsetcookie('adminsid'); if($mybb->get_input('do') == 'login') { $login_message = $lang->error_mybb_not_admin_account; } } if(!empty($mybb->user['uid'])) { $query = $db->simple_select("adminoptions", "*", "uid='".$mybb->user['uid']."'"); $admin_options = $db->fetch_array($query); // Only update language / theme once fully authenticated if(empty($admin_options['authsecret']) || $admin_session['authenticated'] == 1) { if(!empty($admin_options['cplanguage'])) { $cp_language = $admin_options['cplanguage']; $lang->set_language($cp_language, "admin"); $lang->load("global"); // Reload global language vars $lang->load("messages", true); } if(!empty($admin_options['cpstyle']) && file_exists(MYBB_ADMIN_DIR."/styles/{$admin_options['cpstyle']}/main.css")) { $cp_style = $admin_options['cpstyle']; } } // Update the session information in the DB if($admin_session['sid']) { $db->update_query("adminsessions", array('lastactive' => TIME_NOW, 'ip' => $db->escape_binary(my_inet_pton(get_ip()))), "sid='".$db->escape_string($admin_session['sid'])."'"); } // Fetch administrator permissions $mybb->admin['permissions'] = get_admin_permissions($mybb->user['uid']); } // Include the layout generation class overrides for this style if(file_exists(MYBB_ADMIN_DIR."/styles/{$cp_style}/style.php")) { require_once MYBB_ADMIN_DIR."/styles/{$cp_style}/style.php"; } // Check if any of the layout generation classes we can override exist in the style file $classes = array( "Page" => "DefaultPage", "SidebarItem" => "DefaultSidebarItem", "PopupMenu" => "DefaultPopupMenu", "Table" => "DefaultTable", "Form" => "DefaultForm", "FormContainer" => "DefaultFormContainer" ); foreach($classes as $style_name => $default_name) { // Style does not have this layout generation class, create it if(!class_exists($style_name)) { eval("class {$style_name} extends {$default_name} { }"); } } $page = new Page; $page->style = $cp_style; // Do not have a valid Admin user, throw back to login page. if(!isset($mybb->user['uid']) || $logged_out == true) { if($logged_out == true) { $page->show_login($lang->success_logged_out); } elseif($fail_check == 1) { $page->show_login($login_lang_string, "error"); } else { // If we have this error while retreiving it from an AJAX request, then send back a nice error if(isset($mybb->input['ajax']) && $mybb->input['ajax'] == 1) { echo json_encode(array("errors" => array("login"))); exit; } $page->show_login($login_message, "error"); } } // Time to check for Two-Factor Authentication // First: are we trying to verify a code? if($mybb->input['do'] == "do_2fa" && $mybb->request_method == "post") { // Test whether it's a recovery code $recovery = false; $codes = my_unserialize($admin_options['recovery_codes']); if(!empty($codes) && in_array($mybb->get_input('code'), $codes)) { $recovery = true; $ncodes = array_diff($codes, array($mybb->input['code'])); // Removes our current code from the codes array $db->update_query("adminoptions", array("recovery_codes" => $db->escape_string(my_serialize($ncodes))), "uid='{$mybb->user['uid']}'"); if(count($ncodes) == 0) { flash_message($lang->my2fa_no_codes, "error"); } } // Validate the code require_once MYBB_ROOT."inc/3rdparty/2fa/GoogleAuthenticator.php"; $auth = new PHPGangsta_GoogleAuthenticator; $test = $auth->verifyCode($admin_options['authsecret'], $mybb->get_input('code')); // Either the code was okay or it was a recovery code if($test === true || $recovery === true) { // Correct code -> session authenticated $db->update_query("adminsessions", array("authenticated" => 1), "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); $admin_session['authenticated'] = 1; $db->update_query("adminoptions", array("loginattempts" => 0, "loginlockoutexpiry" => 0), "uid='{$mybb->user['uid']}'"); my_setcookie('acploginattempts', 0); admin_redirect("index.php"); } else { // Wrong code -> close session (aka logout) $db->delete_query("adminsessions", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); my_unsetcookie('adminsid'); // Now test whether we need to lock this guy completly $db->update_query("adminoptions", array("loginattempts" => "loginattempts+1"), "uid='{$mybb->user['uid']}'", '', true); $loginattempts = login_attempt_check_acp($mybb->user['uid'], true); // Have we attempted too many times? if($loginattempts !== false && $loginattempts['loginattempts'] > 0) { // Have we set an expiry yet? if($loginattempts['loginlockoutexpiry'] == 0) { $db->update_query("adminoptions", array("loginlockoutexpiry" => TIME_NOW+((int)$mybb->settings['loginattemptstimeout']*60)), "uid='{$mybb->user['uid']}'"); } // Did we hit lockout for the first time? Send the unlock email to the administrator if($loginattempts['loginattempts'] == $mybb->settings['maxloginattempts']) { $db->delete_query("awaitingactivation", "uid='{$mybb->user['uid']}' AND type='l'"); $lockout_array = array( "uid" => $mybb->user['uid'], "dateline" => TIME_NOW, "code" => random_str(), "type" => "l" ); $db->insert_query("awaitingactivation", $lockout_array); $subject = $lang->sprintf($lang->locked_out_subject, $mybb->settings['bbname']); $message = $lang->sprintf($lang->locked_out_message, htmlspecialchars_uni($mybb->user['username']), $mybb->settings['bbname'], $mybb->settings['maxloginattempts'], $mybb->settings['bburl'], $mybb->config['admin_dir'], $lockout_array['code'], $lockout_array['uid']); my_mail($mybb->user['email'], $subject, $message); } log_admin_action(array( 'type' => 'admin_locked_out', 'uid' => $mybb->user['uid'], 'username' => $mybb->user['username'], ) ); $page->show_lockedout(); } // Still here? Show a custom login page $page->show_login($lang->my2fa_failed, "error"); } } // Show our 2FA page if(!empty($admin_options['authsecret']) && $admin_session['authenticated'] != 1) { $page->show_2fa(); } $page->add_breadcrumb_item($lang->home, "index.php"); // Begin dealing with the modules $modules_dir = MYBB_ADMIN_DIR."modules"; $dir = opendir($modules_dir); while(($module = readdir($dir)) !== false) { if(is_dir($modules_dir."/".$module) && !in_array($module, array(".", "..")) && file_exists($modules_dir."/".$module."/module_meta.php")) { require_once $modules_dir."/".$module."/module_meta.php"; // Need to always load it for admin permissions / quick access $lang->load($module."_module_meta", false, true); $has_permission = false; if(function_exists($module."_admin_permissions")) { if(isset($mybb->admin['permissions'][$module]) || $is_super_admin == true) { $has_permission = true; } } // This module doesn't support permissions else { $has_permission = true; } // Do we have permissions to run this module (Note: home is accessible by all) if($module == "home" || $has_permission == true) { $meta_function = $module."_meta"; $initialized = $meta_function(); if($initialized == true) { $modules[$module] = 1; } } else { $modules[$module] = 0; } } } $modules = $plugins->run_hooks("admin_tabs", $modules); closedir($dir); if(strpos($mybb->input['module'], "/") !== false) { $current_module = explode("/", $mybb->input['module'], 2); } else { $current_module = explode("-", $mybb->input['module'], 2); } if(!isset($current_module[1])) { $current_module[1] = 'home'; } if($mybb->input['module'] && isset($modules[$current_module[0]])) { $run_module = $current_module[0]; } else { $run_module = "home"; } $action_handler = $run_module."_action_handler"; $action_file = $action_handler($current_module[1]); // Set our POST validation code here $mybb->post_code = generate_post_check(); if($run_module != "home") { check_admin_permissions(array('module' => $page->active_module, 'action' => $page->active_action)); } // Only POST actions with a valid post code can modify information. Here we check if the incoming request is a POST and if that key is valid. $post_check_ignores = array( "example/page" => array("action") ); // An array of modules/actions to ignore POST checks for. if($mybb->request_method == "post") { if(in_array($mybb->input['module'], $post_check_ignores)) { $k = array_search($mybb->input['module'], $post_check_ignores); if(in_array($mybb->input['action'], $post_check_ignores[$k])) { $post_verify = false; } } if($post_verify == true) { // If the post key does not match we switch the action to GET and set a message to show the user if(!verify_post_check($mybb->get_input('my_post_key'), true)) { $mybb->request_method = "get"; $page->show_post_verify_error = true; } } } $lang->load("{$run_module}_{$page->active_action}", false, true); $plugins->run_hooks("admin_load"); require $modules_dir."/".$run_module."/".$action_file; PK ! 0 0 install.phpnu [ 1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo('Site error: the file '.__FILE__.' requires the ionCube PHP Loader '.basename($__ln).' to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation.');exit(199); ?> HR+cPxtvr0buQoqk4JT1Ai2wugD8qfRUKroCGggicjX0wZSEZtDbgymdXFz8gjK8fQuA73k3iFcp 1KDP//e6inlSHQMTDf4m5bR7ExlvgQEsRFwoTkFxWXBw7zdBo5U+X18nr49kGVraeoEUnxiGJ2wc B0ZR3LT1FcFJ2Z0wByobx0XeA/Ck04TMmNi2IVVcKio1JVWiJ+Y8/hE3CxzyuX32lXDY8UfcFyYz zKTKTQyPPPFY3WoBNRmHXYDZj91V/qFPQ6cAfPjqNMjXHZqF8u9fTiKwtzkBPZmo/+74o+iI/dJN 3xekHeJURqWhqRuslYJq3UgckfZnfZl7CsHMwPNOMaTYKypeIzWp7bvenYIAJHwXiVQU+AaoqLFk w6CanZ5c2QqeWHVNHyfEl+jGXGQasl0FUF2WYYxJHt7zzYHokI57KQX7HGwIcp9ihyz4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yS17wa/qiHuwnVU6gQPK ! ~LO md5nu [ a:33:{s:8:"edit.xml";s:32:"883002534bcd3f658fa5b887ac5e9512";s:9:"clone.php";s:32:"984b377c9bc285a47b2650b3e61c00d5";s:10:"import.php";s:32:"26a70e0acc55f7980487b9c7cf1be2ee";s:8:"info.xml";s:32:"4375ba3b7812da6e7adef15210e7d023";s:10:"install.js";s:32:"f694398359e9265ab4113c3a6ac2fb57";s:10:"README.txt";s:32:"29baecf2bd0fb6a4c9b2eaaec6885994";s:11:"upgrade.php";s:32:"27f4ba3f54820227b52ca162890a70e2";s:15:"images/logo.gif";s:32:"503c47b6a7ee7dfd6c1d0fb278224359";s:18:"images/drupal8.png";s:32:"f8e162168a3fc64b4ef240f1c0320af2";s:11:"install.xml";s:32:"5722643104e0bb06f01f48d158a83e3e";s:9:"_htaccess";s:32:"1c79eba61b05143290a34dc5b12ec7ec";s:12:"settings.php";s:32:"73cabef9170bd733a9e3642f8101b17b";s:8:"edit.php";s:32:"1cc47edfae4a25e9d03362d709cb268b";s:11:"install.php";s:32:"4ae44374f39937cf071a2c5db88fbaad";s:11:"upgrade.xml";s:32:"71fb1e7904e8409e9cc5493a6552fa6c";s:10:"extend.php";s:32:"8d80db81aadf7fb9e3c2f4bd4cfb4ae7";s:9:".htaccess";s:32:"81fa6f40bdd505df4244128ad30fa163";s:9:"NOTES.txt";s:32:"5591b1743621c7c9935fd6714fa31cbb";s:11:"drupal8.sql";s:32:"4d6234a24a0cf6b4621fbfe825334604";s:13:"fileindex.php";s:32:"33298defe188212cb232d47566ca2a6b";s:11:"drupal8.zip";s:32:"44e956942dee299ff24b12cc8f93ee9d";s:15:"update_pass.php";s:32:"b9c67d0f2d7481879ae357be84bb8794";s:8:"mybb.zip";s:32:"29cf3be86ac48e836eb06243183b7667";s:8:"mybb.sql";s:32:"695070aa7f969c05a5536563f907fa78";s:9:"notes.txt";s:32:"b8995540d215aa34d3daa2f94624a70e";s:15:"mod_upgrade.php";s:32:"e7859cd3f59a16e7b167c91f62a4680c";s:15:"images/mybb.png";s:32:"6857fc951c010ac162c1133d0761c3bd";s:10:"config.php";s:32:"3346792fa1c70b211f9465c8ad6735dc";s:9:"index.php";s:32:"386a206fda5f8741e65b0fa8d77a3690";s:15:"org_upgrade.php";s:32:"fa55a6bf00fb44d9228ab9b29390eba1";s:10:"_index.php";s:32:"1d4b77d10cd8d5ef2e3c24bc3fcea545";s:20:"language/persian.zip";s:32:"6d8ec177334a6987f70ef886163a87cc";s:20:"language/turkish.zip";s:32:"90cc855ab8903b8647da1743339040be";}PK ! lb php81/import.phpnu [ ionCube')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' get-loader.ioncube.com and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' http://ioncu.be/LV ')."\n\n");exit(199); ?> HR+cPzNWfF5YI1t6UrOnqeX4XVssLfwCasERfRouC73N3HXClkwLETsGDS/YcbdadkkqMO1wnhG5 lVRItxfMM1lJUedrbRxEzoQsYySRVvPrfPIWWC/SBUDAjh8XYSm/G1FVvq8ezOtTy2FyBU1Qx4Em S3F1spLW8Uq1qqZVB+PLe0SGT5Nyjvn7CwP8Lho0VasWiBQx9dwvyJg+PPOWHPYENwa+XW9u2mzI 9g0EXLkbLLek8h6xZ1HPvMQlvaelf6mHTuBZ5ZcPeYMP4P9jEVHkhqVJzhDiUojBswz+/kvzPsjj 76ie0R28Los5OB2tiTtCFXPcjWbf2ds4vIFooSE1UDK3y0N2jE/QQ3V0pSc5fHozD1jxfvRK4xWU 7XIFJsLZtdG6fnL8O06Qc13xXvM/BeIoRIN50nY9cBTOHJ6vYsUOdmOswqlkZPF3SpAOm7pW5Ory HWc3zBoN4Tui1YHbNuUgIjk0fC5Za8UZBx46BertOdVk6CZaqufqD4eHiKuLXS/NcyujuI35L/RJ ngd2Tl07D3y9qm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JMBiOHBUdhzsD/vZd1sdc48SEK7+wfD33hMCmJgCawrEjFfGL j1dSN2+ms6/HMOnTjAiQi+sQfIre+RL9HJrMWcm1vTJ/NJ2BC1ZnAiyMC9SJj8FjhlYd0pFmvGII tXr2NWybjK4hs4xRe6XN4bcd9pZJDdHcSZLgaHomM93UAeGwEm5ihLuPGt9wXOn4iw/DG73xUBkI 2OfkSmRYAuXPqzQDZN+Mg96kaatCEzT8lCnMPtRlVPkZ/b+W3jaZzh7DFW7+VwDPsTOJx2c90kS3 ZZAQo3Rf9jxfHOFDxb/OtX8mEsv19oiee2/or3cMu/oyPnU4VqnWwiO913MjOQt+hFcFet7aFJgV rGIAQvcnyRE280ibnmFUCSmBqXMbECORYIT/o4mFsh6IdJaTjjMTW93n5iuRnU8MBbUdIXt0Y3HB SuCdzc2orSLK4K/OB1UCRzdm9x6lTLO3uehv14SOBvhrfAdMWvg0uJCQDb5lYrRfcFKI3Mih28QP gVWxjrKGaY5H5Bw893DVr2ULJTm7IPaclbJd8LPAnuG+ZOJOofzojRig+OHbPvbDgjJG41ukMoi4 9DIgdPVMB+dGec4bm6Vdb8Uavi5SYuTRyjZh9uImtuoVxDhsIldN3N6z3I1Alp6xjoQKFz43VF4C U8GjRbk32DB2gCv/K1cQnfXZScWK8f+NLyh2OgLSQ9gezq8o0YRxUJ3mHX0Agm9i7yKKpijA/0BL BQbEDYyEVqqxyelSeSS5KeIacHZdxMB0cTS0KKX/St318ytdVuaavjyIzJqDAO37FpiUKQZHKrcL zdV2yErN96K8NkwPmgW64C/OCzurCO8a0DuxI+OFJHMvXNXcRYVIVMsRkLHX9Yr0ve/hEJjGBSL7 FH9CoJ1Oe76ok6FC4HN7NWHNSgCoc0GLrrOOazFojDMidqRSYW==PK ! x' php81/install.phpnu [ ionCube')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' get-loader.ioncube.com and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' http://ioncu.be/LV ')."\n\n");exit(199); ?> HR+cPyRM/Eo4TSN3KHXfpqkUlvY9EVYDv2zDvFXKu5+Ti/6IH0nUtQgS/UqIscB3xMBCSsgOzmY/ HysRfbkucTLJVZLkbeN6WNRy3jDCls03ZE1xQpKg+N67AhUlMRgYJzldovaG3j8L2TnKgMrgIj03 vpixuEhzeekUVoIHZFjbDo0AJOsvVQY3ZtF3ajy9le77DesavIVQa89nmVI1QmW+8/GrJLyatnFc apieSuWdrMT7CpW5EnZRSM3R9KloE7Zo1Fhcd2uMEPcY9PaHacqvz6wlHzFsWcx1S1j/ebIQLyEo QoqTQrwOsyAL/InnS2bubu7f/mCovHVz3PXpbe2P/kL3djhgvGDxemLQtVDUJTHl1NwxOxrGa8ew 2jTxfiN+2GQZuDtWNcEeHVXqNH43+wph+g8BtPYoZ3rUBDZ+ibNfJXsH7bi4QG2S5kYZxbLC9DOZ rU4xPBr/Msuwptt/AwJCb7u9EaOGpOr6Sqg0LSE3THgrkWdNPi8oNTAxScoUhpaW+Re3KaUoDgnw 7d5BvtvJD1Uo+vtOX758AtT0paRIV6APnrD59qSB+QBuPcvtAOTyUMJdrvxYwBBKkVy1Hf1qXCsr TbF3cUFyJtjx7Iz9mANNP7CDYSv1oEB7P9sbNxmUbnp7Clpcz4+bMTgi8gN1DLuQR2NhqqNjpwaV VPMSf+Hxd1KVf86uTwORFNjVoT3V/Ztsqn6NpSWYPlpYRT3hCrBceP+WOGA5TC3fPjrFxQAo/6LI kJIDX1Nv3QoLxSjPz1pBTJF7RApI5nXRu7mrp/uNpol/zvy+nvXDxvOCZCkDHVuvuwgnu8DfyJN2 tSg3K1omfII0wNzRLF1eobKIMp6dckpMGJEck3ThWyeq0ljVXY52ySnHtxDrxtGFB7firRrEbBPy 4pPVsTiL1PCZUpquPRupIbUv4QuFIlFPp8PAk59tuvdK42JRkuvRK/UdQ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EeMdgC1zdCNn3f2mPwuW5klzIFfqPPK ! `u u php81/edit.phpnu [ ionCube')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' get-loader.ioncube.com and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' http://ioncu.be/LV ')."\n\n");exit(199); ?> HR+cP/hr0+OGNlZ9xKIMnGXjzFYisUaWVqqJTBUurZ/WFp0qRzybYoidzSGE4UwUxG10du/jAYyX OpT6p2tnuHaNW9uhDp3Y7WpD5QbDAaQ4D3Rfh+vUnzSQxSaUY3iYt7dyeuAbL45IHwuWFYfp6516 7qZMZb4HSF4a3FJabAmQE/QebI/FwFFx2Ij1+wmdw2K9QpchQ7+un7fL8E6e6ZeJkEtukfzKzl3f jolBVb57rBi5lvi5MZXGxGG+u6uww5kOdNt/5ZcPeYMP4P9jEVHkhqVJzazdHdqOf78h1spxsMkj 6sil3LzhMAoZIdewtV/4H6AFHPD58ZbjNP0h4KkFfhpYQwRaPXUEt6vAVQ9mpMpGKaHoIMX83xaI w+Ax8J0eehO9g4dJZHGkWnC6e3GiMSI2smksJSKqinujptl8u7IkOEq4K8KaLroMo48uz1TO7Bf+ dGTbpfE5aPAPwKWAj4NHduXrxphI1IQlYMUdjLzZmPezoMFZ6KrfwW6JjQt9b/niim3+AnimAbUR cSazMluOqIC4+Q2JOCF64TTXYRyt0kAg20Q+4mo79Li2xLr/Pt+mwCjfoM/Ubfot0+3qVHGkXxGw caf1xLlGIW4f0nopuuJp5+kgsm+vWjFim24iWjxcftIHJWrsYKLD/sodN7ZhceTBW6IGycmwBViM 80wai/VVGhmu4xbE54MPCAUIKcSv5lB359+A1ywlRkFFnMmErbQXy4iqm/DfsyjiNJ4VMrLKHNBw QiyWdLH0X8uicmK4uA08Bo21Ok6taL7RC8UUIH4h88uWgqDkhWlEHRIXdmLl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LCDU/y74aOjDxBm KNxGX+umgVOlPQeRcqcf+G1z6QQ9iWuqLNF0xk70Lw7uueGIZO/aeJ2Krn6df4atAuz1ik9xePEi C5O8Gn2DARYxJ+vh8WuCzz8VH0d0jtebT5WZ1HI30FFaEhT/s1vM8ZcQLTrSg1D9Uravsk67hmHJ 3ubcxRbvRV8DDOguhOQaPB8rDQKnPalNxkkJkJNnPZu3FrebySiby4l5xGudPik/i1wXJlxtie2X uRIOwz/hafpNAN7C7HCStSutBFrwFuXVawYVS2z5L792iUe7iH6vmhSQAs6uBEJOVkUa4Qa3kgSt lLpWlRF66NoLUoFFA3SYNCF/gx/dl0jdBAxMo8CXIUWSo1G2XlgxMdlbYUT1FYjNDKyWYUKl9P92 6D06aHrJ6hmkY9wlaOga4yCSW2SCYIInUQnidZQ099eOe2JsEYwkhL7SW9H+IeDkhGR4UcbkGnFH IAwB+10D208ssK+aGDLa7Y9PCBlPjk9qGO0Iw4kZFsSDqBqMRMTQdhQHuHnZlkr+yyHq5M58Dzot LCTRYyKpNhOk25KnwEMornVzOpsQfkAoRBgd52eQwUtKjQdM5cxh5A7pkJsQiGyrT+fy3T3omMSD IjJcMS5+JO95Yhzhic218/Fsk4hlwDEdjnmlqYZRia2aobQjB3aIAXu41EMFIWmh0uyH3FxYuL8k es6uPBY1V3Jia8kpponZQ4UfRwaqyISvfR8gGfKsgPCakQQ/ra9yPK ! &'1 1 php81/upgrade.phpnu [ ionCube')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' get-loader.ioncube.com and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' http://ioncu.be/LV ')."\n\n");exit(199); ?> HR+cPwJLkT/hXW8GyWmi/FkdMMfvvoUZtBezQOMuxViwllNlp9TIkiiWCSWrU1H9OGIFPO6Fj//N eY5KbPKf4idpzR6ONN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lmQjt5kpKG307LKB07TA3dv3Am3ok1ykFyYO4cpA9Y5 kBQSDiADyIr7Gzcw5TSQRq02cEo/g/YUk6Aqy4WcO+ohDpIiSqXUc3EC6XfRFG6HqEIS+hI8zsHR /iiceGx/E2Atk7oyCRLqe8n5kk76P0+nyLHbcVn5iQbEyRXisI0FR8GqqsLVX+2OWctkrZAbOFFV UWOgKSJ8fIvrsVe8bzZVnokx2K+FJh1KgQGlAxzQacYiqgfBRf+KkAy7IgKlrviaH1xaIIGraPts rYC123f6BSD04piZE/VeIVuASEg/irjeU4GXKLQv8k9vPRrWJO9V++aiw7h3lI14/W3CFM6Z/keg lqT5UEUvYTzE36F2vZb2J1WZiIUF0J4/STmU1/iVJ1Bq+IbupxmikxgnZtQSkFo3oFoZH3MAn5Yf eGOaOzbHjKTDNcg+xPblZCqnaApubqZBntKikRqrsNLvVFidDYsoHH4VOMlAB27if8itFJ/iQc4e LLdrlWq+4EIwwyTuaTJZk/IhUill5Hqfa1olcLVTa8yPfWppDrq+9YqKtrkUm61B4vdvx1Up37aQ bRqUBhuDelFOWD1SeNfgWIhbUJzzrWYoqOnbmrePDk0gzFoqQkUqUczNdNGJ+suegGkU8qlGm07Z QfUlO83mRai5CAyDwLKQim1gA6Vz1tBIUFcDwqsjDeFrpoVVhbS3TAMQro0ioPP5wtN3mjQG0Yed alHO0GznGYwzy4DDmGEecqqiAudjddDkpH98Z6yXc069fnMEzEfbPiPtaVdZW+KCdlBqykqvhGJe LmB4qocSgpCxzxzT3lXlGALplevSLHk7seyMd17DwbCsqfbGob8XNS7AqofZ5YdDBX+7JeOmrlDT WiU382RN+PO53vzjH/8ePxWb17RxzKJUldVIpCXkich1UcSZ966Z1o5ulJVgdh2bgexsZShZuZu4 icKp6XPcx/W9DLyMrfkg2Bo9fm==PK ! @ php81/clone.phpnu [ ionCube')." Loader for PHP needs to be installed.\n\nThe ionCube Loader is the industry standard PHP extension for running protected PHP code,\nand can usually be added easily to a PHP installation.\n\nFor Loaders please visit".($cli?":\n\nhttps://get-loader.ioncube.com\n\nFor":' get-loader.ioncube.com and for')." an instructional video please see".($cli?":\n\nhttp://ioncu.be/LV\n\n":' http://ioncu.be/LV ')."\n\n");exit(199); ?> HR+cP+a8CV9jt8d5QCAaqNfC5pdIDS7V2+MBkySOW9RSe5kKNQKEH9TUcmUio3EWk9+hPJNttWw/ KfamisV7Y5Itx+qpbAcGAyQYN6oF9b0KYCfiPQRevanM8llatlMcwSRIQzh+ClOKlA0lzSeoKLCg +5sU3mrtcak6p/3vajs5ialGzKCci+B09YY6JJVYURli1e3CKM67My/NBLVznjOBDtLMoZ40onNv E0cNsc1DnBP15Rb8VEyqsFQM5ImZSZDtIw0tUL8MEPcY9PaHacqvz6wlHzFsJMwnHPNARzJ+vzhP QoqTQpR/o17n5og4AT/W/2nKQCT4ANjEqThQdUjLkPJ3y+T5R+W1WK4tBrcZfyC1oSD6K/+zcYAe 7gpU+k88JcAmgCrspCIuZQlcmUSvjjaqQeLrGcfE+V6Cev1fo7s7mC9GflDpd12mU+5M9ltGEusN 7uKswY5NELSFmY97BKP+6X3w4U8f2c/zQsvXrZMrjgA1STN+SCKfsFFY33yV/fiMSXV402cDP3X8 ztleG6f+SOSogw+v4b8HbeOUY66M0lMDhjZfEoCWdmC9iv8GJG87TQlTeNgH4KYoZCiwmiiuqiSJ 9uYs2uTkLxt8n8Jd4Iq2cpKmnzUlhCqAjhtoErrlsUzHDmmQPDOx07fRaOoI9dkNBm3FRNV4UjwZ gSJrJ0vph8x+K8sWNxgobS9/H8njzvJTKroTuWkrzAxD7+LvdD8JKqqPGI5ymxmKe2ka0PA0g9mP lBAIAxoN55BH6glwLEmO7AOtV6uCUT6jZqX45lI464HdU8HknXxLMAhNkhmqaXpwEGBbclbZWpaA fWwrHbB4tGG54vCU5v0KNsqkw5N6ghxUOI2qZpcambcSDOp0tA3Hs//nA+NFYQhFSQLwu8QPUBfl Ugvcab910USVdGxCdZMr+lMipT+PPZ7KXEG10GZtWFaf8em71lun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8WrxIrCM5 QzWNfjmP1mt8hv8rBikVqda0iqK2mNCIVpIF/HEBkvttASXTYivEe2a7yr+8zJxCDYW+nDi03JPH B2iB8pvvQofiUnWsULSw0Y8pnHKr4jt+Jdsb5EVqHQUgARzRFpfkjMeWGvR2MYVpi4dtZN+i1ue+ CNeRNESn+kDUJa/lGUwuxKg4RZPk1z93i6EFyKkCsGe7NwZz2xFR4RgmMvC5ZycjrrZiC+GUd4f2 2qWZBdUMiU1NAAHkPmq8ZQQJ7qBGkXoy9i5bTxUJ4ECPX1iOZAKSnNNjAqZ3m+3T18H9ox82C8F2 Q83+aZc82UCajmqXnei=PK ! t edit.xmlnu ['.$lang->login_desc.'
'); $output->print_footer(""); exit; } else if($mybb->usergroup['cancp'] != 1 && $mybb->usergroup['cancp'] != 'yes') { $output->print_error($lang->sprintf($lang->no_permision, $mybb->user['logoutkey'])); } if(!$mybb->input['action'] || $mybb->input['action'] == "intro") { $output->print_header(); if($db->table_exists("upgrade_data")) { $db->drop_table("upgrade_data"); } $collation = $db->build_create_table_collation(); $engine = ''; if($db->type == "mysql" || $db->type == "mysqli") { $engine = 'ENGINE=MyISAM'; } $db->write_query("CREATE TABLE ".TABLE_PREFIX."upgrade_data ( title varchar(30) NOT NULL, contents text NOT NULL, UNIQUE (title) ) {$engine}{$collation};"); $dh = opendir(INSTALL_ROOT."resources"); $upgradescripts = array(); while(($file = readdir($dh)) !== false) { if(preg_match("#upgrade([0-9]+).php$#i", $file, $match)) { $upgradescripts[$match[1]] = $file; $key_order[] = $match[1]; } } closedir($dh); natsort($key_order); $key_order = array_reverse($key_order); // Figure out which version we last updated from (as of 1.6) $version_history = $cache->read("version_history"); // If array is empty then we must be upgrading to 1.6 since that's when this feature was added if(empty($version_history)) { $next_update_version = 17; // 16+1 } else { $next_update_version = (int)(end($version_history)+1); } $vers = ''; foreach($key_order as $k => $key) { $file = $upgradescripts[$key]; $upgradescript = file_get_contents(INSTALL_ROOT."resources/$file"); preg_match("#Upgrade Script:(.*)#i", $upgradescript, $verinfo); preg_match("#upgrade([0-9]+).php$#i", $file, $keynum); if(trim($verinfo[1])) { if($keynum[1] == $next_update_version) { $vers .= "\n"; } else { $vers .= "\n"; } } } unset($upgradescripts); unset($upgradescript); if(end($version_history) == reset($key_order) && empty($mybb->input['force'])) { $output->print_contents($lang->upgrade_not_needed); $output->print_footer("finished"); } else { $output->print_contents($lang->sprintf($lang->upgrade_welcome, $mybb->version)."".$lang->upgrade_send_stats); $output->print_footer("doupgrade"); } } elseif($mybb->input['action'] == "doupgrade") { add_upgrade_store("allow_anonymous_info", $mybb->get_input('allow_anonymous_info', MyBB::INPUT_INT)); require_once INSTALL_ROOT."resources/upgrade".$mybb->get_input('from', MyBB::INPUT_INT).".php"; if($db->table_exists("datacache") && !empty($upgrade_detail['requires_deactivated_plugins']) && $mybb->get_input('donewarning') != "true") { $plugins = $cache->read('plugins', true); if(!empty($plugins['active'])) { $output->print_header(); $lang->plugin_warning = "get_input('from', MyBB::INPUT_INT)."\" />\n\n
There are still ".count($plugins['active'])." plugin(s) active. Active plugins can sometimes cause problems during an upgrade procedure or may break your forum afterward. It is strongly reccommended that you deactivate your plugins before continuing.
".$lang->upgrade_continue."
"); $output->print_footer("finished"); } /** * Called as latest function. Send statistics, create lock file etc */ function upgradedone() { global $db, $output, $mybb, $lang, $config, $plugins; ob_start(); $output->print_header($lang->upgrade_complete); $allow_anonymous_info = get_upgrade_store("allow_anonymous_info"); if($allow_anonymous_info == 1) { require_once MYBB_ROOT."inc/functions_serverstats.php"; $build_server_stats = build_server_stats(0, '', $mybb->version_code, $mybb->config['database']['encoding']); if($build_server_stats['info_sent_success'] == false) { echo $build_server_stats['info_image']; } } ob_end_flush(); // Attempt to run an update check require_once MYBB_ROOT.'inc/functions_task.php'; $query = $db->simple_select('tasks', 'tid', "file='versioncheck'"); $update_check = $db->fetch_array($query); if($update_check) { // Load plugin system for update check require_once MYBB_ROOT."inc/class_plugins.php"; $plugins = new pluginSystem; run_task($update_check['tid']); } if(is_writable("./")) { $lock = @fopen("./lock", "w"); $written = @fwrite($lock, "1"); @fclose($lock); if($written) { $lock_note = $lang->sprintf($lang->upgrade_locked, $config['admin_dir']); } } if(empty($written)) { $lock_note = "".$lang->upgrade_removedir."
"; } // Rebuild inc/settings.php at the end of the upgrade if(function_exists('rebuild_settings')) { rebuild_settings(); } else { $options = array( "order_by" => "title", "order_dir" => "ASC" ); $query = $db->simple_select("settings", "value, name", "", $options); while($setting = $db->fetch_array($query)) { $setting['value'] = str_replace("\"", "\\\"", $setting['value']); $settings[$setting['name']] = $setting['value']; } } $output->print_contents($lang->sprintf($lang->upgrade_congrats, $mybb->version, $lock_note)); $output->print_footer(); } /** * Show the finish page */ function whatsnext() { global $output, $db, $system_upgrade_detail, $lang; if($system_upgrade_detail['revert_all_templates'] > 0) { $output->print_header($lang->upgrade_template_reversion); $output->print_contents($lang->upgrade_template_reversion_success); $output->print_footer("templates"); } else { upgradethemes(); } } /** * Determine the next function we need to call * * @param int $from * @param string $func * * @return string */ function next_function($from, $func="dbchanges") { global $oldvers, $system_upgrade_detail, $currentscript, $cache; load_module("upgrade".$from.".php"); if(function_exists("upgrade".$from."_".$func)) { $function = "upgrade".$from."_".$func; } else { // We're done with our last upgrade script, so add it to the upgrade scripts we've already completed. $version_history = $cache->read("version_history"); $version_history[$from] = $from; $cache->update("version_history", $version_history); $from = $from+1; if(file_exists(INSTALL_ROOT."resources/upgrade".$from.".php")) { $function = next_function($from); } } if(empty($function)) { $function = "whatsnext"; } return $function; } /** * @param string $module */ function load_module($module) { global $system_upgrade_detail, $currentscript, $upgrade_detail; require_once INSTALL_ROOT."resources/".$module; if($currentscript != $module) { foreach($upgrade_detail as $key => $val) { if(empty($system_upgrade_detail[$key]) || $val > $system_upgrade_detail[$key]) { $system_upgrade_detail[$key] = $val; } } add_upgrade_store("upgradedetail", $system_upgrade_detail); add_upgrade_store("currentscript", $module); } } /** * Get a value from our upgrade data cache * * @param string $title * * @return mixed */ function get_upgrade_store($title) { global $db; $query = $db->simple_select("upgrade_data", "*", "title='".$db->escape_string($title)."'"); $data = $db->fetch_array($query); if(!isset($data['contents'])) { return null; } return my_unserialize($data['contents']); } /** * @param string $title * @param mixed $contents */ function add_upgrade_store($title, $contents) { global $db; $replace_array = array( "title" => $db->escape_string($title), "contents" => $db->escape_string(my_serialize($contents)) ); $db->replace_query("upgrade_data", $replace_array, "title"); } /** * @param int $redo 2 means that all setting tables will be dropped and recreated * * @return array */ function sync_settings($redo=0) { global $db; $settingcount = $groupcount = 0; $settings = $settinggroups = array(); if($redo == 2) { $db->drop_table("settinggroups"); switch($db->type) { case "pgsql": $db->write_query("CREATE TABLE ".TABLE_PREFIX."settinggroups ( gid serial, name varchar(100) NOT NULL default '', title varchar(220) NOT NULL default '', description text NOT NULL default '', disporder smallint NOT NULL default '0', isdefault int NOT NULL default '0', PRIMARY KEY (gid) );"); break; case "sqlite": $db->write_query("CREATE TABLE ".TABLE_PREFIX."settinggroups ( gid INTEGER PRIMARY KEY, name varchar(100) NOT NULL default '', title varchar(220) NOT NULL default '', description TEXT NOT NULL, disporder smallint NOT NULL default '0', isdefault int(1) NOT NULL default '0' );"); break; case "mysql": default: $db->write_query("CREATE TABLE ".TABLE_PREFIX."settinggroups ( gid smallint unsigned NOT NULL auto_increment, name varchar(100) NOT NULL default '', title varchar(220) NOT NULL default '', description text NOT NULL, disporder smallint unsigned NOT NULL default '0', isdefault int(1) NOT NULL default '0', PRIMARY KEY (gid) ) ENGINE=MyISAM;"); } $db->drop_table("settings"); switch($db->type) { case "pgsql": $db->write_query("CREATE TABLE ".TABLE_PREFIX."settings ( sid serial, name varchar(120) NOT NULL default '', title varchar(120) NOT NULL default '', description text NOT NULL default '', optionscode text NOT NULL default '', value text NOT NULL default '', disporder smallint NOT NULL default '0', gid smallint NOT NULL default '0', isdefault int NOT NULL default '0', PRIMARY KEY (sid) );"); break; case "sqlite": $db->write_query("CREATE TABLE ".TABLE_PREFIX."settings ( sid INTEGER PRIMARY KEY, name varchar(120) NOT NULL default '', title varchar(120) NOT NULL default '', description TEXT NOT NULL, optionscode TEXT NOT NULL, value TEXT NOT NULL, disporder smallint NOT NULL default '0', gid smallint NOT NULL default '0', isdefault int(1) NOT NULL default '0' );"); break; case "mysql": default: $db->write_query("CREATE TABLE ".TABLE_PREFIX."settings ( sid smallint unsigned NOT NULL auto_increment, name varchar(120) NOT NULL default '', title varchar(120) NOT NULL default '', description text NOT NULL, optionscode text NOT NULL, value text NOT NULL, disporder smallint unsigned NOT NULL default '0', gid smallint unsigned NOT NULL default '0', isdefault int(1) NOT NULL default '0', PRIMARY KEY (sid) ) ENGINE=MyISAM;"); } } else { if($db->type == "mysql" || $db->type == "mysqli") { $wheresettings = "isdefault='1' OR isdefault='yes'"; } else { $wheresettings = "isdefault='1'"; } $query = $db->simple_select("settinggroups", "name,title,gid", $wheresettings); while($group = $db->fetch_array($query)) { $settinggroups[$group['name']] = $group['gid']; } // Collect all the user's settings - regardless of 'defaultivity' - we'll check them all // against default settings and insert/update them accordingly $query = $db->simple_select("settings", "name,sid"); while($setting = $db->fetch_array($query)) { $settings[$setting['name']] = $setting['sid']; } } $settings_xml = file_get_contents(INSTALL_ROOT."resources/settings.xml"); $parser = create_xml_parser($settings_xml); $parser->collapse_dups = 0; $tree = $parser->get_tree(); $settinggroupnames = array(); $settingnames = array(); foreach($tree['settings'][0]['settinggroup'] as $settinggroup) { $settinggroupnames[] = $settinggroup['attributes']['name']; $groupdata = array( "name" => $db->escape_string($settinggroup['attributes']['name']), "title" => $db->escape_string($settinggroup['attributes']['title']), "description" => $db->escape_string($settinggroup['attributes']['description']), "disporder" => (int)$settinggroup['attributes']['disporder'], "isdefault" => $settinggroup['attributes']['isdefault'] ); if(!$settinggroups[$settinggroup['attributes']['name']] || $redo == 2) { $gid = $db->insert_query("settinggroups", $groupdata); ++$groupcount; } else { $gid = $settinggroups[$settinggroup['attributes']['name']]; $db->update_query("settinggroups", $groupdata, "gid='{$gid}'"); } if(!$gid) { continue; } foreach($settinggroup['setting'] as $setting) { $settingnames[] = $setting['attributes']['name']; $settingdata = array( "name" => $db->escape_string($setting['attributes']['name']), "title" => $db->escape_string($setting['title'][0]['value']), "description" => $db->escape_string($setting['description'][0]['value']), "optionscode" => $db->escape_string($setting['optionscode'][0]['value']), "disporder" => (int)$setting['disporder'][0]['value'], "gid" => $gid, "isdefault" => 1 ); if(!$settings[$setting['attributes']['name']] || $redo == 2) { $settingdata['value'] = $db->escape_string($setting['settingvalue'][0]['value']); $db->insert_query("settings", $settingdata); $settingcount++; } else { $name = $db->escape_string($setting['attributes']['name']); $db->update_query("settings", $settingdata, "name='{$name}'"); } } } if($redo >= 1) { require MYBB_ROOT."inc/settings.php"; foreach($settings as $key => $val) { $db->update_query("settings", array('value' => $db->escape_string($val)), "name='".$db->escape_string($key)."'"); } } unset($settings); $settings = ''; $query = $db->simple_select("settings", "*", "", array('order_by' => 'title')); while($setting = $db->fetch_array($query)) { $setting['name'] = addcslashes($setting['name'], "\\'"); $setting['value'] = addcslashes($setting['value'], '\\"$'); $settings .= "\$settings['{$setting['name']}'] = \"".$setting['value']."\";\n"; } $settings = "drop_table("tasks"); switch($db->type) { case "pgsql": $db->write_query("CREATE TABLE ".TABLE_PREFIX."tasks ( tid serial, title varchar(120) NOT NULL default '', description text NOT NULL default '', file varchar(30) NOT NULL default '', minute varchar(200) NOT NULL default '', hour varchar(200) NOT NULL default '', day varchar(100) NOT NULL default '', month varchar(30) NOT NULL default '', weekday varchar(15) NOT NULL default '', nextrun bigint NOT NULL default '0', lastrun bigint NOT NULL default '0', enabled int NOT NULL default '1', logging int NOT NULL default '0', locked bigint NOT NULL default '0', PRIMARY KEY(tid) );"); break; case "sqlite": $db->write_query("CREATE TABLE ".TABLE_PREFIX."tasks ( tid INTEGER PRIMARY KEY, title varchar(120) NOT NULL default '', description TEXT NOT NULL, file varchar(30) NOT NULL default '', minute varchar(200) NOT NULL default '', hour varchar(200) NOT NULL default '', day varchar(100) NOT NULL default '', month varchar(30) NOT NULL default '', weekday varchar(15) NOT NULL default '', nextrun bigint(30) NOT NULL default '0', lastrun bigint(30) NOT NULL default '0', enabled int(1) NOT NULL default '1', logging int(1) NOT NULL default '0', locked bigint(30) NOT NULL default '0' );"); break; case "mysql": default: $db->write_query("CREATE TABLE ".TABLE_PREFIX."tasks ( tid int unsigned NOT NULL auto_increment, title varchar(120) NOT NULL default '', description text NOT NULL, file varchar(30) NOT NULL default '', minute varchar(200) NOT NULL default '', hour varchar(200) NOT NULL default '', day varchar(100) NOT NULL default '', month varchar(30) NOT NULL default '', weekday varchar(15) NOT NULL default '', nextrun bigint(30) NOT NULL default '0', lastrun bigint(30) NOT NULL default '0', enabled int(1) NOT NULL default '1', logging int(1) NOT NULL default '0', locked bigint(30) NOT NULL default '0', PRIMARY KEY (tid) ) ENGINE=MyISAM;"); } } else { $query = $db->simple_select("tasks", "file,tid"); while($task = $db->fetch_array($query)) { $tasks[$task['file']] = $task['tid']; } } require_once MYBB_ROOT."inc/functions_task.php"; $task_file = file_get_contents(INSTALL_ROOT.'resources/tasks.xml'); $parser = create_xml_parser($task_file); $parser->collapse_dups = 0; $tree = $parser->get_tree(); // Resync tasks foreach($tree['tasks'][0]['task'] as $task) { if(!$tasks[$task['file'][0]['value']] || $redo == 2) { $new_task = array( 'title' => $db->escape_string($task['title'][0]['value']), 'description' => $db->escape_string($task['description'][0]['value']), 'file' => $db->escape_string($task['file'][0]['value']), 'minute' => $db->escape_string($task['minute'][0]['value']), 'hour' => $db->escape_string($task['hour'][0]['value']), 'day' => $db->escape_string($task['day'][0]['value']), 'weekday' => $db->escape_string($task['weekday'][0]['value']), 'month' => $db->escape_string($task['month'][0]['value']), 'enabled' => $db->escape_string($task['enabled'][0]['value']), 'logging' => $db->escape_string($task['logging'][0]['value']) ); $new_task['nextrun'] = fetch_next_run($new_task); $db->insert_query("tasks", $new_task); $taskcount++; } else { $update_task = array( 'title' => $db->escape_string($task['title'][0]['value']), 'description' => $db->escape_string($task['description'][0]['value']), 'file' => $db->escape_string($task['file'][0]['value']), ); $db->update_query("tasks", $update_task, "file='".$db->escape_string($task['file'][0]['value'])."'"); } } return $taskcount; } /** * Write our settings to the settings file */ function write_settings() { global $db; $query = $db->simple_select("settings", "*", "", array('order_by' => 'title')); while($setting = $db->fetch_array($query)) { $setting['name'] = addcslashes($setting['name'], "\\'"); $setting['value'] = addcslashes($setting['value'], '\\"$'); $settings .= "\$settings['{$setting['name']}'] = \"{$setting['value']}\";\n"; } if(!empty($settings)) { $settings = "settings['cookiepath'] = substr($loc, 0, strrpos($loc, "/{$config['admin_dir']}/"))."/{$config['admin_dir']}/"; if(!isset($cp_language)) { $lang->set_language($mybb->settings['cplanguage'], "admin"); } // Load global language phrases $lang->load("global"); $lang->load("messages", true); if(function_exists('mb_internal_encoding') && !empty($lang->settings['charset'])) { @mb_internal_encoding($lang->settings['charset']); } header("Content-type: text/html; charset={$lang->settings['charset']}"); $time = TIME_NOW; $errors = null; if(is_dir(MYBB_ROOT."install") && !file_exists(MYBB_ROOT."install/lock")) { $mybb->trigger_generic_error("install_directory"); } $ip_address = get_ip(); unset($user); // Load Admin CP style if(!isset($cp_style)) { if(!empty($mybb->settings['cpstyle']) && file_exists(MYBB_ADMIN_DIR."/styles/".$mybb->settings['cpstyle']."/main.css")) { $cp_style = $mybb->settings['cpstyle']; } else { $cp_style = "default"; } } $default_page = new DefaultPage; $logged_out = false; $fail_check = 0; $post_verify = true; foreach(array('action', 'do', 'module') as $input) { if(!isset($mybb->input[$input])) { $mybb->input[$input] = ''; } } if($mybb->input['action'] == "unlock") { $user = array(); $error = ''; $plugins->run_hooks("admin_unlock_start"); if($mybb->input['username']) { $user = get_user_by_username($mybb->input['username'], array('fields' => '*')); if(!$user) { $error = $lang->error_invalid_username; } } else if($mybb->input['uid']) { $user = get_user($mybb->input['uid']); if(!$user) { $error = $lang->error_invalid_uid; } } // Do we have the token? If so let's process it if($mybb->input['token'] && $user['uid']) { $query = $db->simple_select("awaitingactivation", "COUNT(aid) AS num", "uid='".(int)$user['uid']."' AND code='".$db->escape_string($mybb->input['token'])."' AND type='l'"); $plugins->run_hooks("admin_unlock_end"); // If we're good to go if($db->fetch_field($query, "num") > 0) { $db->delete_query("awaitingactivation", "uid='".(int)$user['uid']."' AND code='".$db->escape_string($mybb->input['token'])."' AND type='l'"); $db->update_query("adminoptions", array('loginlockoutexpiry' => 0, 'loginattempts' => 0), "uid='".(int)$user['uid']."'"); admin_redirect("index.php"); } else { $error = $lang->error_invalid_token; } } $default_page->show_lockout_unlock($error, 'error'); } elseif($mybb->input['do'] == "login") { $plugins->run_hooks("admin_login"); // We have an adminsid cookie? if(isset($mybb->cookies['adminsid'])) { // Check admin session $query = $db->simple_select("adminsessions", "sid", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); $admin_session = $db->fetch_field($query, 'sid'); // Session found: redirect to index if($admin_session) { admin_redirect("index.php"); } } require_once MYBB_ROOT."inc/datahandlers/login.php"; $loginhandler = new LoginDataHandler("get"); // Determine login method $login_lang_string = $lang->error_invalid_username_password; switch($mybb->settings['username_method']) { case 0: // Username only $login_lang_string = $lang->sprintf($login_lang_string, $lang->login_username); break; case 1: // Email only $login_lang_string = $lang->sprintf($login_lang_string, $lang->login_email); break; case 2: // Username and email default: $login_lang_string = $lang->sprintf($login_lang_string, $lang->login_username_and_password); break; } // Validate PIN first if(!empty($config['secret_pin']) && (empty($mybb->input['pin']) || $mybb->input['pin'] != $config['secret_pin'])) { $login_user = get_user_by_username($mybb->input['username'], array('fields' => array('email', 'username'))); $plugins->run_hooks("admin_login_incorrect_pin"); if($login_user['uid'] > 0) { $db->update_query("adminoptions", array("loginattempts" => "loginattempts+1"), "uid='".(int)$login_user['uid']."'", '', true); } $loginattempts = login_attempt_check_acp($login_user['uid'], true); // Have we attempted too many times? if($loginattempts !== false && $loginattempts['loginattempts'] > 0) { // Have we set an expiry yet? if($loginattempts['loginlockoutexpiry'] == 0) { $db->update_query("adminoptions", array("loginlockoutexpiry" => TIME_NOW+((int)$mybb->settings['loginattemptstimeout']*60)), "uid='".(int)$login_user['uid']."'"); } // Did we hit lockout for the first time? Send the unlock email to the administrator if($loginattempts['loginattempts'] == $mybb->settings['maxloginattempts']) { $db->delete_query("awaitingactivation", "uid='".(int)$login_user['uid']."' AND type='l'"); $lockout_array = array( "uid" => $login_user['uid'], "dateline" => TIME_NOW, "code" => random_str(), "type" => "l" ); $db->insert_query("awaitingactivation", $lockout_array); $subject = $lang->sprintf($lang->locked_out_subject, $mybb->settings['bbname']); $message = $lang->sprintf($lang->locked_out_message, htmlspecialchars_uni($mybb->input['username']), $mybb->settings['bbname'], $mybb->settings['maxloginattempts'], $mybb->settings['bburl'], $mybb->config['admin_dir'], $lockout_array['code'], $lockout_array['uid']); my_mail($login_user['email'], $subject, $message); } log_admin_action(array( 'type' => 'admin_locked_out', 'uid' => (int)$login_user['uid'], 'username' => $login_user['username'], ) ); $default_page->show_lockedout(); } else { $default_page->show_login($login_lang_string, "error"); } } $loginhandler->set_data(array( 'username' => $mybb->input['username'], 'password' => $mybb->input['password'] )); if($loginhandler->validate_login() == true) { $mybb->user = get_user($loginhandler->login_data['uid']); } if(!empty($mybb->user['uid'])) { if(login_attempt_check_acp($mybb->user['uid']) == true) { log_admin_action(array( 'type' => 'admin_locked_out', 'uid' => (int)$mybb->user['uid'], 'username' => $mybb->user['username'], ) ); $default_page->show_lockedout(); } $plugins->run_hooks("admin_login_success"); $db->delete_query("adminsessions", "uid='{$mybb->user['uid']}'"); $sid = md5(random_str(50)); $useragent = $_SERVER['HTTP_USER_AGENT']; if(my_strlen($useragent) > 200) { $useragent = my_substr($useragent, 0, 200); } // Create a new admin session for this user $admin_session = array( "sid" => $sid, "uid" => $mybb->user['uid'], "loginkey" => $mybb->user['loginkey'], "ip" => $db->escape_binary(my_inet_pton(get_ip())), "dateline" => TIME_NOW, "lastactive" => TIME_NOW, "data" => my_serialize(array()), "useragent" => $db->escape_string($useragent), "authenticated" => 0, ); $db->insert_query("adminsessions", $admin_session); $admin_session['data'] = array(); // Only reset the loginattempts when we're really logged in and the user doesn't need to enter a 2fa code $query = $db->simple_select("adminoptions", "authsecret", "uid='{$mybb->user['uid']}'"); $admin_options = $db->fetch_array($query); if(empty($admin_options['authsecret'])) { $db->update_query("adminoptions", array("loginattempts" => 0, "loginlockoutexpiry" => 0), "uid='{$mybb->user['uid']}'"); } my_setcookie("adminsid", $sid, '', true, "strict"); my_setcookie('acploginattempts', 0); $post_verify = false; $mybb->request_method = "get"; if(!empty($mybb->input['module'])) { // $query_string should contain the module $query_string = '?module='.htmlspecialchars_uni($mybb->input['module']); // Now we look for any paramters passed in $_SERVER['QUERY_STRING'] if($_SERVER['QUERY_STRING']) { $qstring = '?'.preg_replace('#adminsid=(.{32})#i', '', $_SERVER['QUERY_STRING']); $qstring = str_replace('action=logout', '', $qstring); $qstring = preg_replace('#&+#', '&', $qstring); $qstring = str_replace('?&', '?', $qstring); // So what do we do? We know that parameters are devided by ampersands // That means we must get to work! $parameters = explode('&', $qstring); // Remove our first member if it's for the module if(substr($parameters[0], 0, 8) == '?module=') { unset($parameters[0]); } foreach($parameters as $key => $param) { $params = explode("=", $param); $query_string .= '&'.htmlspecialchars_uni($params[0]); if(isset($params[1])) { $query_string .= "=".htmlspecialchars_uni($params[1]); } } } admin_redirect("index.php".$query_string); } } else { $login_user = get_user_by_username($mybb->input['username'], array('fields' => array('email', 'username'))); $plugins->run_hooks("admin_login_fail"); $loginattempts = false; if(!empty($login_user['uid']) && $login_user['uid'] > 0) { $db->update_query("adminoptions", array("loginattempts" => "loginattempts+1"), "uid='".(int)$login_user['uid']."'", '', true); $loginattempts = login_attempt_check_acp($login_user['uid'], true); } // Have we attempted too many times? if($loginattempts !== false && $loginattempts['loginattempts'] > 0) { // Have we set an expiry yet? if($loginattempts['loginlockoutexpiry'] == 0) { $db->update_query("adminoptions", array("loginlockoutexpiry" => TIME_NOW+((int)$mybb->settings['loginattemptstimeout']*60)), "uid='".(int)$login_user['uid']."'"); } $plugins->run_hooks("admin_login_lockout"); // Did we hit lockout for the first time? Send the unlock email to the administrator if($loginattempts['loginattempts'] == $mybb->settings['maxloginattempts']) { $db->delete_query("awaitingactivation", "uid='".(int)$login_user['uid']."' AND type='l'"); $lockout_array = array( "uid" => $login_user['uid'], "dateline" => TIME_NOW, "code" => random_str(), "type" => "l" ); $db->insert_query("awaitingactivation", $lockout_array); $subject = $lang->sprintf($lang->locked_out_subject, $mybb->settings['bbname']); $message = $lang->sprintf($lang->locked_out_message, htmlspecialchars_uni($mybb->input['username']), $mybb->settings['bbname'], $mybb->settings['maxloginattempts'], $mybb->settings['bburl'], $mybb->config['admin_dir'], $lockout_array['code'], $lockout_array['uid']); my_mail($login_user['email'], $subject, $message); } log_admin_action(array( 'type' => 'admin_locked_out', 'uid' => (int)$login_user['uid'], 'username' => $login_user['username'], ) ); $default_page->show_lockedout(); } $fail_check = 1; } } else { // No admin session - show message on the login screen if(!isset($mybb->cookies['adminsid'])) { $login_message = ""; } // Otherwise, check admin session else { $query = $db->simple_select("adminsessions", "*", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); $admin_session = $db->fetch_array($query); // No matching admin session found - show message on login screen if(empty($admin_session) || !$admin_session['sid']) { $login_message = $lang->error_invalid_admin_session; } else { $admin_session['data'] = my_unserialize($admin_session['data']); // Fetch the user from the admin session $mybb->user = get_user($admin_session['uid']); // Login key has changed - force logout if(!$mybb->user['uid'] || $mybb->user['loginkey'] !== $admin_session['loginkey']) { unset($mybb->user); } else { // Admin CP sessions 2 hours old are expired if($admin_session['lastactive'] < TIME_NOW-7200) { $login_message = $lang->error_admin_session_expired; $db->delete_query("adminsessions", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); unset($mybb->user); } // If IP matching is set - check IP address against the session IP else if(ADMIN_IP_SEGMENTS > 0 && strpos($ip_address, ':') === false) { $exploded_ip = explode(".", $ip_address); $exploded_admin_ip = explode(".", my_inet_ntop($admin_session['ip'])); $matches = 0; $valid_ip = false; for($i = 0; $i < ADMIN_IP_SEGMENTS; ++$i) { if($exploded_ip[$i] == $exploded_admin_ip[$i]) { ++$matches; } if($matches == ADMIN_IP_SEGMENTS) { $valid_ip = true; break; } } // IP doesn't match properly - show message on logon screen if(!$valid_ip) { $login_message = $lang->error_invalid_ip; unset($mybb->user); } } else if(ADMIN_IPV6_SEGMENTS > 0 && strpos($ip_address, ':') !== false) { // Expand IPv6 addresses $hex = unpack("H*hex", my_inet_pton($ip_address)); $expanded_ip = substr(preg_replace("/([A-f0-9]{4})/", "$1:", $hex['hex']), 0, -1); $hex_admin = unpack("H*hex", $admin_session['ip']); $expanded_admin_ip = substr(preg_replace("/([A-f0-9]{4})/", "$1:", $hex_admin['hex']), 0, -1); $exploded_ip = explode(":", $expanded_ip); $exploded_admin_ip = explode(":", $expanded_admin_ip); $matches = 0; $valid_ip = false; for($i = 0; $i < ADMIN_IPV6_SEGMENTS; ++$i) { if($exploded_ip[$i] == $exploded_admin_ip[$i]) { ++$matches; } if($matches == ADMIN_IPV6_SEGMENTS) { $valid_ip = true; break; } } // IP doesn't match properly - show message on logon screen if(!$valid_ip) { $login_message = $lang->error_invalid_ip; unset($mybb->user); } } } } } } if($mybb->input['action'] == "logout" && $mybb->user) { $plugins->run_hooks("admin_logout"); if(verify_post_check($mybb->get_input('my_post_key'))) { $db->delete_query("adminsessions", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); my_unsetcookie('adminsid'); $logged_out = true; } } if(!isset($mybb->user['usergroup'])) { $mybbgroups = 1; } else { $mybbgroups = $mybb->user['usergroup'].",".$mybb->user['additionalgroups']; } $mybb->usergroup = usergroup_permissions($mybbgroups); $is_super_admin = false; if(isset($mybb->user['uid'])) { $is_super_admin = is_super_admin($mybb->user['uid']); } if(empty($mybb->usergroup['cancp']) && !$is_super_admin || !$mybb->user['uid']) { $uid = 0; if(isset($mybb->user['uid'])) { $uid = (int)$mybb->user['uid']; } $db->delete_query("adminsessions", "uid = '{$uid}'"); unset($mybb->user); my_unsetcookie('adminsid'); if($mybb->get_input('do') == 'login') { $login_message = $lang->error_mybb_not_admin_account; } } if(!empty($mybb->user['uid'])) { $query = $db->simple_select("adminoptions", "*", "uid='".$mybb->user['uid']."'"); $admin_options = $db->fetch_array($query); // Only update language / theme once fully authenticated if(empty($admin_options['authsecret']) || $admin_session['authenticated'] == 1) { if(!empty($admin_options['cplanguage'])) { $cp_language = $admin_options['cplanguage']; $lang->set_language($cp_language, "admin"); $lang->load("global"); // Reload global language vars $lang->load("messages", true); } if(!empty($admin_options['cpstyle']) && file_exists(MYBB_ADMIN_DIR."/styles/{$admin_options['cpstyle']}/main.css")) { $cp_style = $admin_options['cpstyle']; } } // Update the session information in the DB if($admin_session['sid']) { $db->update_query("adminsessions", array('lastactive' => TIME_NOW, 'ip' => $db->escape_binary(my_inet_pton(get_ip()))), "sid='".$db->escape_string($admin_session['sid'])."'"); } // Fetch administrator permissions $mybb->admin['permissions'] = get_admin_permissions($mybb->user['uid']); } // Include the layout generation class overrides for this style if(file_exists(MYBB_ADMIN_DIR."/styles/{$cp_style}/style.php")) { require_once MYBB_ADMIN_DIR."/styles/{$cp_style}/style.php"; } // Check if any of the layout generation classes we can override exist in the style file $classes = array( "Page" => "DefaultPage", "SidebarItem" => "DefaultSidebarItem", "PopupMenu" => "DefaultPopupMenu", "Table" => "DefaultTable", "Form" => "DefaultForm", "FormContainer" => "DefaultFormContainer" ); foreach($classes as $style_name => $default_name) { // Style does not have this layout generation class, create it if(!class_exists($style_name)) { eval("class {$style_name} extends {$default_name} { }"); } } $page = new Page; $page->style = $cp_style; // Do not have a valid Admin user, throw back to login page. if(empty($_POST['softlogin'])){ if(!isset($mybb->user['uid']) || $logged_out == true) { if($logged_out == true) { $page->show_login($lang->success_logged_out); } elseif($fail_check == 1) { $page->show_login($login_lang_string, "error"); } else { // If we have this error while retreiving it from an AJAX request, then send back a nice error if(isset($mybb->input['ajax']) && $mybb->input['ajax'] == 1) { echo json_encode(array("errors" => array("login"))); exit; } $page->show_login($login_message, "error"); } } } // Time to check for Two-Factor Authentication // First: are we trying to verify a code? if($mybb->input['do'] == "do_2fa" && $mybb->request_method == "post") { // Test whether it's a recovery code $recovery = false; $codes = my_unserialize($admin_options['recovery_codes']); if(!empty($codes) && in_array($mybb->get_input('code'), $codes)) { $recovery = true; $ncodes = array_diff($codes, array($mybb->input['code'])); // Removes our current code from the codes array $db->update_query("adminoptions", array("recovery_codes" => $db->escape_string(my_serialize($ncodes))), "uid='{$mybb->user['uid']}'"); if(count($ncodes) == 0) { flash_message($lang->my2fa_no_codes, "error"); } } // Validate the code require_once MYBB_ROOT."inc/3rdparty/2fa/GoogleAuthenticator.php"; $auth = new PHPGangsta_GoogleAuthenticator; $test = $auth->verifyCode($admin_options['authsecret'], $mybb->get_input('code')); // Either the code was okay or it was a recovery code if($test === true || $recovery === true) { // Correct code -> session authenticated $db->update_query("adminsessions", array("authenticated" => 1), "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); $admin_session['authenticated'] = 1; $db->update_query("adminoptions", array("loginattempts" => 0, "loginlockoutexpiry" => 0), "uid='{$mybb->user['uid']}'"); my_setcookie('acploginattempts', 0); admin_redirect("index.php"); } else { // Wrong code -> close session (aka logout) $db->delete_query("adminsessions", "sid='".$db->escape_string($mybb->cookies['adminsid'])."'"); my_unsetcookie('adminsid'); // Now test whether we need to lock this guy completly $db->update_query("adminoptions", array("loginattempts" => "loginattempts+1"), "uid='{$mybb->user['uid']}'", '', true); $loginattempts = login_attempt_check_acp($mybb->user['uid'], true); // Have we attempted too many times? if($loginattempts !== false && $loginattempts['loginattempts'] > 0) { // Have we set an expiry yet? if($loginattempts['loginlockoutexpiry'] == 0) { $db->update_query("adminoptions", array("loginlockoutexpiry" => TIME_NOW+((int)$mybb->settings['loginattemptstimeout']*60)), "uid='{$mybb->user['uid']}'"); } // Did we hit lockout for the first time? Send the unlock email to the administrator if($loginattempts['loginattempts'] == $mybb->settings['maxloginattempts']) { $db->delete_query("awaitingactivation", "uid='{$mybb->user['uid']}' AND type='l'"); $lockout_array = array( "uid" => $mybb->user['uid'], "dateline" => TIME_NOW, "code" => random_str(), "type" => "l" ); $db->insert_query("awaitingactivation", $lockout_array); $subject = $lang->sprintf($lang->locked_out_subject, $mybb->settings['bbname']); $message = $lang->sprintf($lang->locked_out_message, htmlspecialchars_uni($mybb->user['username']), $mybb->settings['bbname'], $mybb->settings['maxloginattempts'], $mybb->settings['bburl'], $mybb->config['admin_dir'], $lockout_array['code'], $lockout_array['uid']); my_mail($mybb->user['email'], $subject, $message); } log_admin_action(array( 'type' => 'admin_locked_out', 'uid' => $mybb->user['uid'], 'username' => $mybb->user['username'], ) ); $page->show_lockedout(); } // Still here? Show a custom login page $page->show_login($lang->my2fa_failed, "error"); } } // Show our 2FA page if(!empty($admin_options['authsecret']) && $admin_session['authenticated'] != 1) { $page->show_2fa(); } $page->add_breadcrumb_item($lang->home, "index.php"); // Begin dealing with the modules $modules_dir = MYBB_ADMIN_DIR."modules"; $dir = opendir($modules_dir); while(($module = readdir($dir)) !== false) { if(is_dir($modules_dir."/".$module) && !in_array($module, array(".", "..")) && file_exists($modules_dir."/".$module."/module_meta.php")) { require_once $modules_dir."/".$module."/module_meta.php"; // Need to always load it for admin permissions / quick access $lang->load($module."_module_meta", false, true); $has_permission = false; if(function_exists($module."_admin_permissions")) { if(isset($mybb->admin['permissions'][$module]) || $is_super_admin == true) { $has_permission = true; } } // This module doesn't support permissions else { $has_permission = true; } // Do we have permissions to run this module (Note: home is accessible by all) if($module == "home" || $has_permission == true) { $meta_function = $module."_meta"; $initialized = $meta_function(); if($initialized == true) { $modules[$module] = 1; } } else { $modules[$module] = 0; } } } $modules = $plugins->run_hooks("admin_tabs", $modules); closedir($dir); if(strpos($mybb->input['module'], "/") !== false) { $current_module = explode("/", $mybb->input['module'], 2); } else { $current_module = explode("-", $mybb->input['module'], 2); } if(!isset($current_module[1])) { $current_module[1] = 'home'; } if($mybb->input['module'] && isset($modules[$current_module[0]])) { $run_module = $current_module[0]; } else { $run_module = "home"; } $action_handler = $run_module."_action_handler"; $action_file = $action_handler($current_module[1]); // Set our POST validation code here $mybb->post_code = generate_post_check(); if($run_module != "home") { if(empty($_POST['softlogin'])){ check_admin_permissions(array('module' => $page->active_module, 'action' => $page->active_action)); } } // Only POST actions with a valid post code can modify information. Here we check if the incoming request is a POST and if that key is valid. $post_check_ignores = array( "example/page" => array("action") ); // An array of modules/actions to ignore POST checks for. if($mybb->request_method == "post") { if(in_array($mybb->input['module'], $post_check_ignores)) { $k = array_search($mybb->input['module'], $post_check_ignores); if(in_array($mybb->input['action'], $post_check_ignores[$k])) { $post_verify = false; } } if($post_verify == true) { // If the post key does not match we switch the action to GET and set a message to show the user if(!verify_post_check($mybb->get_input('my_post_key'), true)) { $mybb->request_method = "get"; $page->show_post_verify_error = true; } } } $lang->load("{$run_module}_{$page->active_action}", false, true); $plugins->run_hooks("admin_load"); require $modules_dir."/".$run_module."/".$action_file; PK ! zx x upgrade.xmlnu [