From c26dede97f626b52b7bf8962ed55d1dbda86abe8 Mon Sep 17 00:00:00 2001 From: Hilmar R Date: Sun, 28 Feb 2021 21:06:16 +0100 Subject: get dev --- boot.php | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) mode change 100755 => 100644 boot.php (limited to 'boot.php') diff --git a/boot.php b/boot.php old mode 100755 new mode 100644 index a9ce4b129..4c3e4c00b --- a/boot.php +++ b/boot.php @@ -28,6 +28,8 @@ */ // composer autoloader for all namespaced Classes +use Zotlabs\Lib\Crypto; + require_once('vendor/autoload.php'); require_once('include/config.php'); @@ -50,10 +52,10 @@ require_once('include/attach.php'); require_once('include/bbcode.php'); define ( 'PLATFORM_NAME', 'hubzilla' ); -define ( 'STD_VERSION', '5.2.9' ); +define ( 'STD_VERSION', '5.5.1' ); define ( 'ZOT_REVISION', '6.0' ); -define ( 'DB_UPDATE_VERSION', 1241 ); +define ( 'DB_UPDATE_VERSION', 1243 ); define ( 'PROJECT_BASE', __DIR__ ); @@ -601,6 +603,7 @@ define ( 'DBTYPE_POSTGRES', 1 ); function sys_boot() { + // our central App object App::init(); @@ -681,14 +684,18 @@ function sys_boot() { function startup() { - error_reporting(E_ERROR | E_WARNING | E_PARSE); + error_reporting(E_ALL & ~E_NOTICE); + + if (version_compare(PHP_VERSION, '8.0.0') >= 0) { + error_reporting(E_ALL & ~E_WARNING & ~E_NOTICE); + } // Some hosting providers block/disable this @set_time_limit(0); if(function_exists ('ini_set')) { // This has to be quite large to deal with embedded private photos - @ini_set('pcre.backtrack_limit', 500000); + //@ini_set('pcre.backtrack_limit', 500000); // Use cookies to store the session ID on the client side @ini_set('session.use_only_cookies', 1); @@ -1570,7 +1577,7 @@ function fix_system_urls($oldurl, $newurl) { dbesc($channel_address . '@' . $rhs), dbesc($newurl), dbesc(str_replace($oldurl,$newurl,$rv['hubloc_id_url'])), - dbesc(($rv['hubloc_network'] === 'zot6') ? \Zotlabs\Lib\Libzot::sign($newurl,$c[0]['channel_prvkey']) : base64url_encode(rsa_sign($newurl,$c[0]['channel_prvkey']))), + dbesc(($rv['hubloc_network'] === 'zot6') ? \Zotlabs\Lib\Libzot::sign($newurl,$c[0]['channel_prvkey']) : base64url_encode(Crypto::sign($newurl,$c[0]['channel_prvkey']))), dbesc($newhost), dbesc(($rv['hubloc_network'] === 'zot6') ? $newurl . '/zot' : $newurl . '/post'), dbesc($rv['xchan_hash']), @@ -1756,7 +1763,7 @@ function shutdown() { */ function get_account_id() { - if(intval($_SESSION['account_id'])) + if(isset($_SESSION['account_id'])) return intval($_SESSION['account_id']); if(App::$account) @@ -2063,12 +2070,10 @@ function is_site_admin() { if(! session_id()) return false; - if($_SESSION['delegate']) + if(isset($_SESSION['delegate'])) return false; - if((intval($_SESSION['authenticated'])) - && (is_array(App::$account)) - && (App::$account['account_roles'] & ACCOUNT_ROLE_ADMIN)) + if(isset($_SESSION['authenticated']) && is_array(App::$account) && (App::$account['account_roles'] & ACCOUNT_ROLE_ADMIN)) return true; return false; @@ -2250,6 +2255,8 @@ function load_pdl() { $n = 'mod_' . App::$module . '.pdl' ; $u = App::$comanche->get_channel_id(); + $s = ''; + if($u) $s = get_pconfig($u, 'system', $n); if(! $s) -- cgit v1.2.3