require_once SSO_ROOT_PATH . "/" . SSO_SUPPORT_PATH . "/sso_functions.php"; require_once SSO_ROOT_PATH . "/" . SSO_SUPPORT_PATH . "/blowfish.php"; require_once SSO_ROOT_PATH . "/" . SSO_SUPPORT_PATH . "/aes.php"; if (!ExtendedAES::IsMcryptAvailable()) { require_once SSO_ROOT_PATH . "/" . SSO_SUPPORT_PATH . "/phpseclib/AES.php"; } require_once SSO_ROOT_PATH . "/" . SSO_SUPPORT_PATH . "/random.php"; Str::ProcessAllInput(); // Initialize the global CSPRNG instance. $sso_rng = new CSPRNG(); // Timing attack defense. SSO_RandomSleep(); // Calculate the remote IP address. $sso_ipaddr = SSO_GetRemoteIP(); // Initialize language settings. BB_InitLangmap(SSO_ROOT_PATH . "/" . SSO_LANG_PATH . "/", SSO_DEFAULT_LANG); if (isset($_REQUEST["lang"]) && $_REQUEST["lang"] == "") { unset($_REQUEST["lang"]); } if (isset($_REQUEST["lang"])) { BB_SetLanguage(SSO_ROOT_PATH . "/" . SSO_LANG_PATH . "/", $_REQUEST["lang"]); } function SSO_DisplayError($msg, $htmlmsg = "") { global $sso_header, $sso_footer; if (isset($_REQUEST["sso_ajax"])) { echo htmlspecialchars(BB_Translate($msg)) . $htmlmsg; } else { echo $sso_header; echo "<div class=\"sso_server_message_wrap" . ($htmlmsg == "" ? " sso_server_message_wrap_nosplit" : "") . "\"><div class=\"sso_server_error\">" . htmlspecialchars(BB_Translate($msg)) . "</div></div>"; echo $htmlmsg;
require_once ROOT_PATH . "/" . SUPPORT_PATH . "/debug.php"; SetDebugLevel(); // Load core functions. require_once ROOT_PATH . "/" . SUPPORT_PATH . "/bb_functions.php"; if (USE_HTTPS && !BB_IsSSLRequest()) { header("Location: " . BB_GetFullRequestURLBase("https") . "?bb_action=bb_main_edit"); exit; } // Load backend multilingual support. if (!defined("LANG_PATH")) { define("LANG_PATH", "lang"); } if (!defined("DEFAULT_LANG")) { define("DEFAULT_LANG", ""); } BB_InitLangmap(ROOT_PATH . "/" . LANG_PATH . "/", DEFAULT_LANG); // Load plugins. $plugins = BB_GetPluginList(); foreach ($plugins as $file) { require_once ROOT_PATH . "/" . PLUGIN_PATH . "/" . $file . "/index.php"; } BB_RunPluginAction("plugins_loaded"); // Make sure an account is loaded. Using REQUEST allows automation and Flash-based uploads to work. $bb_account = false; if (isset($_REQUEST["bbl"])) { require_once "accounts.php"; BB_RunPluginAction("accounts_loaded"); if (isset($bb_accounts["sessions"][$_REQUEST["bbl"]])) { $bb_session = $bb_accounts["sessions"][$_REQUEST["bbl"]]; if ($bb_session["expire"] < time()) { BB_DeleteExpiredUserSessions();