From c359d3f9b979de149fa6355d7cfeebce7690153e Mon Sep 17 00:00:00 2001 From: "Mr. Timothy G Webb Sr" Date: Fri, 20 Nov 2020 01:05:41 -0500 Subject: [PATCH 01/22] Update tfpdf.php Added missing tag for Date: Fri, 20 Nov 2020 11:18:18 +0100 Subject: [PATCH 02/22] New domain template @ admin panel did not display the TLD selection #743 --- Makefile | 3 +++ .../Servicedomain/html_admin/mod_servicedomain_order.phtml | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 994ff3543..ae4ac2ca4 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,9 @@ logs: ## Show app logs exec-php: ## Enter PHP container shell $(DOCKER_PHP_CONTAINER_EXEC) bash +cache-flush: ## Flush Twig cache + $(DOCKER_PHP_CONTAINER_EXEC) rm -fr src/bb-data/cache/* + exec-db: ## Enter DB container shell $(DOCKER_DB_CONTAINER_EXEC) bash diff --git a/src/bb-modules/Servicedomain/html_admin/mod_servicedomain_order.phtml b/src/bb-modules/Servicedomain/html_admin/mod_servicedomain_order.phtml index 459fb5dc5..3933b0f87 100644 --- a/src/bb-modules/Servicedomain/html_admin/mod_servicedomain_order.phtml +++ b/src/bb-modules/Servicedomain/html_admin/mod_servicedomain_order.phtml @@ -1,3 +1,4 @@ +{% import "macro_functions.phtml" as mf %}
@@ -44,4 +45,4 @@ $(function() { }); }); - \ No newline at end of file + From 5b51e258035a3062f45a2627d231b3c7b430f8cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Fri, 20 Nov 2020 16:19:45 +0300 Subject: [PATCH 03/22] A brand new error page, some enhancements to error messages --- src/bb-load.php | 156 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 141 insertions(+), 15 deletions(-) diff --git a/src/bb-load.php b/src/bb-load.php index d74d75e39..778be7c45 100644 --- a/src/bb-load.php +++ b/src/bb-load.php @@ -47,18 +47,140 @@ function handler_exception($e) } $page = " - - - Error - - BoxBilling - "; + + + + + + + + + An error ocurred + + + + + + + + + + + + +
+
+
+

Error

"; $page = str_replace(PHP_EOL, "", $page); print $page; if($e->getCode()) { - print sprintf('

Code: %s

', $e->getCode()); + print sprintf('

Error code: %s

', $e->getCode()); } print sprintf('

%s

', $e->getMessage()); print sprintf('

Look for detailed error explanation

', urlencode($e->getMessage())); @@ -70,13 +192,17 @@ function handler_exception($e) print sprintf('

Line: "%s"

', $e->getLine()); print sprintf('Trace:
%s
', $e->getTraceAsString()); } + print("

Powered by BoxBilling

+ + + "); } set_exception_handler("handler_exception"); set_error_handler('handler_error'); -// multisite support. Load new config depending on current host -// if run from cli first param must be hostname +// Multisite support. Load new configuration depending on the current hostname +// If being run from CLI, first parameter must be the hostname $configPath = BB_PATH_ROOT.'/bb-config.php'; if((isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST']) || (php_sapi_name() == 'cli' && isset($argv[1]) ) ) { if(php_sapi_name() == 'cli') { @@ -91,17 +217,17 @@ if((isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST']) || (php_sapi_name() = } } -// check if config is available +// Try to check if configuration is available if(!file_exists($configPath) || 0 == filesize( $configPath )) { - //try create empty config file + // Try to create an empty configuration file @file_put_contents($configPath, ''); $base_url = "http://".$_SERVER['HTTP_HOST']; $base_url .= preg_replace('@/+$@','',dirname($_SERVER['SCRIPT_NAME'])).'/'; $url = $base_url . 'install/index.php'; $configFile = pathinfo($configPath, PATHINFO_BASENAME); - $msg = sprintf("There doesn't seem to be a $configFile file or bb-config.php file does not contain required configuration parameters. I need this before we can get started. Need more help? We got it. You can create a $configFile file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.

Continue with BoxBilling installation", $url); + $msg = sprintf("The $configFile path seems to be invalid. You may have not generated the configuration file yet, or the configuration file may not contain the required configuration parameters. BoxBilling needs to have a valid configuration file present in order to function properly. Need some help with the installation? We got it. You can create the configuration file using the interactive installer, or manually create the configuration file.

If it's your first time setting up BoxBilling, you can continue with the web-based interactive BoxBilling installation.", $url); throw new Exception($msg, 101); } @@ -135,4 +261,4 @@ if($config['debug']) { ini_set('log_errors', '1'); ini_set('html_errors', FALSE); -ini_set('error_log', BB_PATH_LOG . '/php_error.log'); \ No newline at end of file +ini_set('error_log', BB_PATH_LOG . '/php_error.log'); From 4a4f2f596b45ca9961a14684066da0e217011a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Fri, 20 Nov 2020 16:32:45 +0300 Subject: [PATCH 04/22] Renaming classes --- src/bb-load.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/bb-load.php b/src/bb-load.php index 778be7c45..681085f42 100644 --- a/src/bb-load.php +++ b/src/bb-load.php @@ -78,12 +78,12 @@ function handler_exception($e) margin: 0; } - #notfound { + #error { position: relative; height: 100vh; } - #notfound .notfound { + #error .error { position: absolute; left: 50%; top: 50%; @@ -92,14 +92,14 @@ function handler_exception($e) transform: translate(-50%, -50%); } - .notfound { + .error { max-width: 560px; width: 100%; padding-left: 160px; line-height: 1.1; } - .notfound .notfound-404 { + .error .error-container { position: absolute; left: 0; top: 0; @@ -110,7 +110,7 @@ function handler_exception($e) background-size: cover; } - .notfound .notfound-404:before { + .error .error-container:before { content: ''; position: absolute; width: 100%; @@ -123,7 +123,7 @@ function handler_exception($e) z-index: -1; } - .notfound h1 { + .error h1 { font-family: 'Nunito', sans-serif; font-size: 65px; font-weight: 700; @@ -133,7 +133,7 @@ function handler_exception($e) text-transform: uppercase; } - .notfound h2 { + .error h2 { font-family: 'Nunito', sans-serif; font-size: 21px; font-weight: 400; @@ -142,13 +142,13 @@ function handler_exception($e) color: #151723; } - .notfound p { + .error p { font-family: 'Nunito', sans-serif; color: #999fa5; font-weight: 400; } - .notfound a { + .error a { font-family: 'Nunito', sans-serif; display: inline-block; font-weight: 700; @@ -158,11 +158,11 @@ function handler_exception($e) } @media only screen and (max-width: 767px) { - .notfound .notfound-404 { + .error .error-container { width: 110px; height: 110px; } - .notfound { + .error { padding-left: 15px; padding-right: 15px; padding-top: 110px; @@ -173,9 +173,9 @@ function handler_exception($e) -

-
-
+
+
+

Error

"; $page = str_replace(PHP_EOL, "", $page); print $page; From 62114121b9511a6534714aefa2066685ccf04858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Fri, 20 Nov 2020 16:37:24 +0300 Subject: [PATCH 05/22] Minor fixes --- src/bb-load.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bb-load.php b/src/bb-load.php index 681085f42..b023ef297 100644 --- a/src/bb-load.php +++ b/src/bb-load.php @@ -183,7 +183,7 @@ function handler_exception($e) print sprintf('

Error code: %s

', $e->getCode()); } print sprintf('

%s

', $e->getMessage()); - print sprintf('

Look for detailed error explanation

', urlencode($e->getMessage())); + print sprintf('

Look for detailed error explanation

', urlencode($e->getMessage())); if(defined('BB_DEBUG') && BB_DEBUG) { print sprintf('%s', 'Set BB_DEBUG to FALSE, to hide the message below'); @@ -227,7 +227,7 @@ if(!file_exists($configPath) || 0 == filesize( $configPath )) { $base_url .= preg_replace('@/+$@','',dirname($_SERVER['SCRIPT_NAME'])).'/'; $url = $base_url . 'install/index.php'; $configFile = pathinfo($configPath, PATHINFO_BASENAME); - $msg = sprintf("The $configFile path seems to be invalid. You may have not generated the configuration file yet, or the configuration file may not contain the required configuration parameters. BoxBilling needs to have a valid configuration file present in order to function properly. Need some help with the installation? We got it. You can create the configuration file using the interactive installer, or manually create the configuration file.

If it's your first time setting up BoxBilling, you can continue with the web-based interactive BoxBilling installation.", $url); + $msg = sprintf("The $configFile path seems to be invalid. You may have not generated the configuration file yet, or the configuration file may not contain the required configuration parameters. BoxBilling needs to have a valid configuration file present in order to function properly.

Need some help with the installation? We got it. You can create the configuration file using the interactive installer, or manually create the configuration file.

If it's your first time setting up BoxBilling, you can continue with the web-based interactive BoxBilling installation.", $url); throw new Exception($msg, 101); } From 733ccd8915c72fafb446f3bae539f1c27badd6e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Fri, 20 Nov 2020 17:20:46 +0300 Subject: [PATCH 06/22] [SECURITY] The loader script now checks if the installer still exists. --- src/bb-load.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bb-load.php b/src/bb-load.php index b023ef297..71eb2e3e3 100644 --- a/src/bb-load.php +++ b/src/bb-load.php @@ -231,6 +231,11 @@ if(!file_exists($configPath) || 0 == filesize( $configPath )) { throw new Exception($msg, 101); } +// Try to check if /install directory still exists, even after the installation was completed +if(file_exists($configPath) && 0 !== filesize($configPath) && file_exists(BB_PATH_ROOT.'/install/index.php')) { + throw new Exception("For safety reasons, you have to delete the /install directory to start using BoxBilling.

Please delete the /install directory from your web server.", 102); +} + $config = require_once $configPath; require BB_PATH_VENDOR . '/autoload.php'; From e0848f9fd873c3734d9e9c4c4c99720de82479a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Fri, 20 Nov 2020 17:26:24 +0300 Subject: [PATCH 07/22] The test module should delete the "./src/install" directory before making any tests --- .github/workflows/php.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 027cc62ed..a9d1746a2 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -43,6 +43,7 @@ jobs: echo > ./src/bb-data/log/license.log echo > ./src/bb-data/log/application.log echo > ./src/bb-data/log/php_error.log + rm -rf ./src/install - name: Run test suite for bb-modules run: | @@ -50,4 +51,4 @@ jobs: - name: Run test suite for bb-library run: | - php ./src/bb-vendor/bin/phpunit ./tests/bb-library/ \ No newline at end of file + php ./src/bb-vendor/bin/phpunit ./tests/bb-library/ From 88d3d1d7cd3efb77fa43fa03e6cde0c6c3dba117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Fri, 20 Nov 2020 17:38:23 +0300 Subject: [PATCH 08/22] We don't need another slash --- src/bb-load.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-load.php b/src/bb-load.php index 71eb2e3e3..5b17b49d1 100644 --- a/src/bb-load.php +++ b/src/bb-load.php @@ -224,7 +224,7 @@ if(!file_exists($configPath) || 0 == filesize( $configPath )) { @file_put_contents($configPath, ''); $base_url = "http://".$_SERVER['HTTP_HOST']; - $base_url .= preg_replace('@/+$@','',dirname($_SERVER['SCRIPT_NAME'])).'/'; + $base_url .= preg_replace('@/+$@','',dirname($_SERVER['SCRIPT_NAME'])); $url = $base_url . 'install/index.php'; $configFile = pathinfo($configPath, PATHINFO_BASENAME); $msg = sprintf("The $configFile path seems to be invalid. You may have not generated the configuration file yet, or the configuration file may not contain the required configuration parameters. BoxBilling needs to have a valid configuration file present in order to function properly.

Need some help with the installation? We got it. You can create the configuration file using the interactive installer, or manually create the configuration file.

If it's your first time setting up BoxBilling, you can continue with the web-based interactive BoxBilling installation.", $url); From a253c68cfa6faa3ef8c79266e3578091bbef3068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Fri, 20 Nov 2020 18:42:26 +0300 Subject: [PATCH 09/22] Renaming htaccess.txt directly to .htaccess --- src/{htaccess.txt => .htaccess} | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) rename src/{htaccess.txt => .htaccess} (92%) diff --git a/src/htaccess.txt b/src/.htaccess similarity index 92% rename from src/htaccess.txt rename to src/.htaccess index 4ea01a860..fcd5b8b82 100644 --- a/src/htaccess.txt +++ b/src/.htaccess @@ -1,6 +1,5 @@ # Read documentation http://docs.boxbilling.com/ for more information -# Rename this file to .htaccess in order to work -# If you are receiving "Internal Server Error" message - make sure mod_rewrite is enabled in apache +# If you are receiving "Internal Server Error" message, make sure mod_rewrite is enabled in apache Options -Indexes Options +FollowSymLinks @@ -24,7 +23,7 @@ RewriteRule .* index.php [F] # ## End - Rewrite rules to block out some common exploits. -### re-direct to www +### Redirect to www #RewriteCond %{HTTP_HOST} ^yourdomain.com #RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L] @@ -61,4 +60,4 @@ RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L] Header set Cache-Control "max-age=43200" - \ No newline at end of file + From 1669285ae6dff1f5b9622afab508fadea68049b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Fri, 20 Nov 2020 18:44:44 +0300 Subject: [PATCH 10/22] making 'sef_urls' default to true --- src/bb-config-sample.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-config-sample.php b/src/bb-config-sample.php index fd2fda56c..8b14beedc 100755 --- a/src/bb-config-sample.php +++ b/src/bb-config-sample.php @@ -31,7 +31,7 @@ return array( * Configure .htaccess file before enabling this feature * Set to TRUE if using nginx */ - 'sef_urls' => false, + 'sef_urls' => true, /** * Application timezone From ca47e7d5975c7f81db392a8dc23a2117d3cc5d59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Fri, 20 Nov 2020 18:52:53 +0300 Subject: [PATCH 11/22] "Install" folder should be deleted while making tests --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index ae4ac2ca4..6dc14c171 100644 --- a/Makefile +++ b/Makefile @@ -49,6 +49,7 @@ test: start ## Run app tests echo "Running unit tests" echo > ./src/bb-data/log/application.log echo > ./src/bb-data/log/php_error.log + rm -rf src/install $(DOCKER_PHP_CONTAINER_EXEC) composer install --working-dir=src --no-progress --no-suggest --prefer-dist $(DOCKER_PHP_CONTAINER_EXEC) ./src/bb-vendor/bin/phpunit --dont-report-useless-tests ./tests/bb-modules/ From 7244e092bd53fb8ee1420c153eaac8e4ce973fe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Fri, 20 Nov 2020 21:30:35 +0300 Subject: [PATCH 12/22] Adding a "box" logo with a good resolution --- src/bb-themes/boxbilling/assets/images/box.png | Bin 0 -> 23216 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/bb-themes/boxbilling/assets/images/box.png diff --git a/src/bb-themes/boxbilling/assets/images/box.png b/src/bb-themes/boxbilling/assets/images/box.png new file mode 100644 index 0000000000000000000000000000000000000000..1582275d34f53658170a0da74e76bf0e0ad6d549 GIT binary patch literal 23216 zcmV*6Ky$x|P)ffv-NWCotf_Ef$7_)PMtbm)m!hk zRTW|KnMhzFfkh_)T68U%G-x7$i3BhK=422|B(Ml2FahQw?3789CK8wcb20`d5?F*1 zm;iGTcFLql6A4U!IT-^J2`oYhOn|uvJ7vToib_CL;@3F z9^zx5T7`A#rC>y0hxn^Zny*M;0?b2jIB+n|oQ}eZ*`ut+&V#3A%Fgc0f#zeC3OZ+> z4f_y$rAd=D2~2=_hzyAvZa@Y={s3l5S=M=K$H`nlgy#b&1K1DX8#Xzg%ux25nc9K+ z8{df5ghdaL&NVc10?b9+cU1=K#7`h!sZ34J0ncC#Tg{ktCWvt`n)=RW47C}W^&zleNcZfP;oX`V*e%p1V) zDh3=A!i;HK?SSFC1n1*aDt?L4o_(jxpmFAz!XBMCjnYbU9?DOEIS)cMJ%TgivgadL z>8!|G_3rX+ru(Pl&{`t4gadVq&Duv`-?rd<9F}#{ic;;s52nz*^u@3z>h2h&p0et3 z4uF(RIWmgha0BuO3o8mvqj?-L_Im{DPZ+Uh1H!p8pC1N>okaL|hn#=U6pFVs9@?{a z*Df@xRdnaGA(LnIOJD-b@sA4n#y608=%HohX1<$caQ+w${W*a>lL)0TvtzQiW9WeJ zO8{TBh<&DLTeq}Y2j?c?mt^7_N2v)g$01dKsy85ad|^eQT(3_bB>aj6YXbwGPe5Tj zj~q#@+}>=1;Z9iil$Ei*lC_*)7Q1r?&pJzlU!0LVWl~A31SY_Y6;bj6Jl5E5FRL_4 zj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 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-load.php b/src/bb-load.php index 5b17b49d1..d1a900c08 100644 --- a/src/bb-load.php +++ b/src/bb-load.php @@ -106,7 +106,7 @@ function handler_exception($e) display: inline-block; width: 140px; height: 140px; - background-image: url('./bb-themes/boxbilling/assets/images/logo.png'); + background-image: url('./bb-themes/boxbilling/assets/images/box.png'); background-size: cover; } From 327a3742699a2246ca86d03ca8201c6b8f69d6cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Fri, 20 Nov 2020 23:38:17 +0300 Subject: [PATCH 14/22] Small fix --- src/bb-load.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bb-load.php b/src/bb-load.php index d1a900c08..31961ac37 100644 --- a/src/bb-load.php +++ b/src/bb-load.php @@ -106,7 +106,7 @@ function handler_exception($e) display: inline-block; width: 140px; height: 140px; - background-image: url('./bb-themes/boxbilling/assets/images/box.png'); + background-image: url('/bb-themes/boxbilling/assets/images/box.png'); background-size: cover; } From 389d9b939e6b6ffd67323143cd061eaf829d670c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Sat, 21 Nov 2020 11:53:34 +0300 Subject: [PATCH 15/22] BB version check implementation to the installer --- src/install/index.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/install/index.php b/src/install/index.php index 28f1fff84..5e83ad7d1 100644 --- a/src/install/index.php +++ b/src/install/index.php @@ -78,13 +78,13 @@ final class Box_Installer case 'install': try { - //db + // Initializing database connection $user = $_POST['db_user']; $host = $_POST['db_host']; $pass = $_POST['db_pass']; $name = $_POST['db_name']; if (!$this->canConnectToDatabase($host, $name, $user, $pass)) { - throw new Exception('Could not connect to database or database does not exist'); + throw new Exception('Could not connect to the database, or the database does not exist'); } else { $this->session->set('db_host', $host); $this->session->set('db_name', $name); @@ -92,12 +92,12 @@ final class Box_Installer $this->session->set('db_pass', $pass); } - // admin config + // Configuring administrator's account $admin_email = $_POST['admin_email']; $admin_pass = $_POST['admin_pass']; $admin_name = $_POST['admin_name']; if (!$this->isValidAdmin($admin_email, $admin_pass, $admin_name)) { - throw new Exception('Administrators account is not valid'); + throw new Exception('Administrator\'s account is not valid'); } else { $this->session->set('admin_email', $admin_email); $this->session->set('admin_pass', $admin_pass); @@ -128,6 +128,8 @@ final class Box_Installer 'files' => $se->files(), 'os' => PHP_OS, 'os_ok' => true, + 'box_ver' => Box_Version::VERSION, + 'box_ver_ok' => $se->isBoxVersionOk(), 'php_ver' => $options['php']['version'], 'php_ver_req' => $options['php']['min_version'], 'php_safe_mode' => $options['php']['safe_mode'], @@ -263,12 +265,9 @@ final class Box_Installer $pdo = $this->getPdo($ns->get('db_host'), $ns->get('db_name'), $ns->get('db_user'), $ns->get('db_pass')); $sql = file_get_contents(BB_PATH_SQL); - if (!$sql) { - throw new Exception('Could not read structure.sql file'); - } - $sql_content = file_get_contents(BB_PATH_SQL_DATA); - if (!$sql_content) { + + if (!$sql || !$sql_content) { throw new Exception('Could not read structure.sql file'); } @@ -296,7 +295,7 @@ final class Box_Installer try { $this->_sendMail($ns); } catch (Exception $e) { - // email was not sent but that is not a problem + // E-mail was not sent, but that is not a problem error_log($e->getMessage()); } @@ -313,7 +312,7 @@ final class Box_Installer $content .= "You have successfully setup BoxBilling at " . BB_URL . PHP_EOL; $content .= "Access client area at: " . BB_URL . PHP_EOL; $content .= "Access admin area at: " . BB_URL_ADMIN . " with login details:" . PHP_EOL; - $content .= "Email: " . $admin_email . PHP_EOL; + $content .= "E-mail: " . $admin_email . PHP_EOL; $content .= "Password: " . $admin_pass . PHP_EOL . PHP_EOL; $content .= "Read BoxBilling documentation to get started https://docs.boxbilling.com/" . PHP_EOL; @@ -328,7 +327,7 @@ final class Box_Installer { $output = $this->_getConfigOutput($data); if (!@file_put_contents(BB_PATH_CONFIG, $output)) { - throw new Exception('Configuration file is not writable or does not exists. Please create file ' . BB_PATH_CONFIG . ' and make it writable', 101); + throw new Exception('Configuration file is not writable or does not exist. Please create the file at ' . BB_PATH_CONFIG . ' and make it writable', 101); } } From dfb35e0a989ff395e5c3c8706c360be71076cd6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Sat, 21 Nov 2020 11:54:11 +0300 Subject: [PATCH 16/22] Installer now checks for BoxBilling's version --- src/install/install.phtml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/install/install.phtml b/src/install/install.phtml index 355c93e41..a59eb729e 100644 --- a/src/install/install.phtml +++ b/src/install/install.phtml @@ -85,6 +85,12 @@ {% if not os_ok %}BoxBilling might not work properly on your operating system{% endif %} + + BoxBilling version + {{ box_ver }} + {% if not box_ver_ok %}BoxBilling couldn't find valid version information. This is okay if you've brought a copy of BoxBilling directly from the master branch, and not from releases. But beware, master branch may not be stable enough to be used for production use.{% endif %} + + PHP version {{ php_ver }} @@ -347,4 +353,4 @@ $(function() { } -{% endblock %} \ No newline at end of file +{% endblock %} From c8e76682728fb592d193ff45e2c0d94edc39c2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Sat, 21 Nov 2020 11:54:55 +0300 Subject: [PATCH 17/22] typos --- src/install/install.phtml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/install/install.phtml b/src/install/install.phtml index a59eb729e..24b73e17e 100644 --- a/src/install/install.phtml +++ b/src/install/install.phtml @@ -5,16 +5,16 @@

BoxBilling installation

This setup will guide you through installation process of BoxBilling.

-

Check if your system meets minimum requirements to install and run billing software.

+

Check if your system meets minimum requirements to install and run BoxBilling.

Database configuration
-

BoxBilling stores data in SQL database. You should already have an existing database before this step. If you do not have database prepared, you should do that now.

+

BoxBilling stores data in a SQL database. You should already have an existing database before this step. If you do not have database prepared, you should do that now.

Installer will create all required tables in your database after correct connection details are provided.

-

How to create database?

+

How to create a database?

Depending on your hosting provider database can be created in different ways.

Best way is to check the documentation available with your webhosting account. You can contact their support if you really get stuck.

From 237ee9ea9c2f8ffe4b63ca11e65341b7de1972d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Sat, 21 Nov 2020 11:55:59 +0300 Subject: [PATCH 18/22] A brand new implementation, isBoxVersionOk() --- src/bb-library/Box/Requirements.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/bb-library/Box/Requirements.php b/src/bb-library/Box/Requirements.php index e8c31c49a..3263f7a83 100644 --- a/src/bb-library/Box/Requirements.php +++ b/src/bb-library/Box/Requirements.php @@ -110,6 +110,15 @@ class Box_Requirements implements \Box\InjectionAwareInterface return version_compare($current, $required, '>='); } + public function isBoxVersionOk() + { + $current = Box_Version::VERSION; + if ($current == "0.0.1") { + return false; + } + return true; + } + /** * What extensions must be loaded for BoxBilling o function correctly */ @@ -199,4 +208,4 @@ class Box_Requirements implements \Box\InjectionAwareInterface return ($configmod == $perm); } -} \ No newline at end of file +} From 55e92fc619577a25941704a362935138dcd8601f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Sat, 21 Nov 2020 12:01:45 +0300 Subject: [PATCH 19/22] A few adjustments --- src/install/install.phtml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/install/install.phtml b/src/install/install.phtml index 24b73e17e..0a63394a7 100644 --- a/src/install/install.phtml +++ b/src/install/install.phtml @@ -103,15 +103,15 @@ {% if php_safe_mode %}PHP safe mode should be OFF{% endif %} - {% for ext,loaded in extensions %} + {% for ext, loaded in extensions %} - PHP Extension: {{ ext }} + PHP extension: {{ ext }} {{ loaded ? 'Ok' : 'Fail'}} {% if not loaded %}Contact your server administrator to enable PHP {{ ext }} extension{% endif %} {% endfor %} - {% for file,writable in files %} + {% for file, writable in files %} {{ file }} {{ writable ? 'Yes' : 'No'}} @@ -119,7 +119,7 @@ {% endfor %} - {% for folder,writable in folders %} + {% for folder, writable in folders %} {{ folder }} {{ writable ? 'Yes' : 'No'}} @@ -188,7 +188,7 @@
- +
@@ -209,10 +209,10 @@

Congratulations! BoxBilling was successfully installed.

-

Even though BoxBilling was installed successfully you must take a few more actions.

+

Even though BoxBilling was installed successfully, you must take a few more actions.

Remove installation module

-

Remove installation module for security reasons.

+

For security reasons, you have to delete the installer from your web server before getting started.

{{ install_module_path }}

Change configuration file permissions

@@ -222,10 +222,6 @@

Setup cron job

Setup this cron job to run every five minutes

*/5 * * * * php {{ cron_path }}
- -

Disable directory listing with .htaccess

-

Disable directory listing with .htaccess

-
Rename file htaccess.txt to .htaccess
@@ -243,7 +239,7 @@ $(function() { $('.wizard').smartWizard({ selected: 0, // Selected Step, 0 = first step - keyNavigation: true, // Enable/Disable key navigation(left and right keys are used if enabled) + keyNavigation: true, // Enable/Disable key navigation (left and right keys are used if enabled) enableAllSteps: false, // Enable/Disable all steps on first load transitionEffect: 'fade', // Effect on navigation, none/fade/slide/slideleft contentURL:null, // specifying content url enables ajax content loading From 229352d31a0adf20c6f3fbeb40eec07920cf8292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Sat, 21 Nov 2020 12:05:04 +0300 Subject: [PATCH 20/22] SEO-friendly URLs can be enabled by default --- src/install/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install/index.php b/src/install/index.php index 5e83ad7d1..a6f7b46fe 100644 --- a/src/install/index.php +++ b/src/install/index.php @@ -338,7 +338,7 @@ final class Box_Installer 'salt' => md5(uniqid()), 'url' => BB_URL, 'admin_area_prefix' => '/bb-admin', - 'sef_urls' => false, + 'sef_urls' => true, 'timezone' => 'UTC', 'locale' => 'en_US', 'locale_date_format' => '%A, %d %B %G', From cc38844f2e04dca7d85780d11104d313fffd237d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Sat, 21 Nov 2020 12:13:00 +0300 Subject: [PATCH 21/22] Version check for system --- src/bb-modules/System/Service.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bb-modules/System/Service.php b/src/bb-modules/System/Service.php index c0f2833fc..63a62933c 100644 --- a/src/bb-modules/System/Service.php +++ b/src/bb-modules/System/Service.php @@ -241,6 +241,10 @@ class Service $msgs['info'][] = sprintf('Install module "%s" still exists. Please remove it for security reasons.', $install); } + if($this->getVersion() == "0.0.1") { + $msgs['info'][] = 'BoxBilling couldn\'t find valid version information. This is okay if you\'ve brought a copy of BoxBilling directly from the master branch, and not from releases. But beware, master branch may not be stable enough to be used for production use.'; + } + if(!extension_loaded('openssl')) { $msgs['info'][] = sprintf('BoxBilling requires %s extension to be enabled on this server for security reasons.', 'php openssl'); } @@ -1562,4 +1566,4 @@ class Service $this->di['session']->delete('pending_messages'); return true; } -} \ No newline at end of file +} From bd87bb0dbd86e9101f8911bb60afc98b342dd605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1zhan?= Date: Sat, 21 Nov 2020 20:10:44 +0300 Subject: [PATCH 22/22] Loader now checks for Composer packages --- src/bb-load.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/bb-load.php b/src/bb-load.php index 31961ac37..9d5d19445 100644 --- a/src/bb-load.php +++ b/src/bb-load.php @@ -201,6 +201,12 @@ function handler_exception($e) set_exception_handler("handler_exception"); set_error_handler('handler_error'); +// Check for Composer packages +$vendorPath = BB_PATH_ROOT.'/bb-vendor'; +if(!file_exists($vendorPath)) { + throw new Exception("It seems like Composer packages are missing. You have to run \"composer install\" in order to install them. For detailed instruction, you can see Composer's getting started guide.

If you have downloaded BoxBilling from GitHub releases, this shouldn't happen.", 103); +} + // Multisite support. Load new configuration depending on the current hostname // If being run from CLI, first parameter must be the hostname $configPath = BB_PATH_ROOT.'/bb-config.php'; @@ -218,7 +224,7 @@ if((isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST']) || (php_sapi_name() = } // Try to check if configuration is available -if(!file_exists($configPath) || 0 == filesize( $configPath )) { +if(!file_exists($configPath) || 0 == filesize($configPath)) { // Try to create an empty configuration file @file_put_contents($configPath, ''); @@ -255,11 +261,11 @@ if($config['sef_urls']) { } if($config['debug']) { - error_reporting( E_ALL ); + error_reporting(E_ALL); ini_set('display_errors', '1'); ini_set('display_startup_errors', '1'); } else { - error_reporting( E_RECOVERABLE_ERROR ); + error_reporting(E_RECOVERABLE_ERROR); ini_set('display_errors', '0'); ini_set('display_startup_errors', '0'); }