aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rw-r--r--[-rwxr-xr-x]boot.php27
1 files changed, 17 insertions, 10 deletions
diff --git a/boot.php b/boot.php
index a9ce4b129..4c3e4c00b 100755..100644
--- 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)