From a16c76940fc9f237861bccd30f167c52fc4e47c6 Mon Sep 17 00:00:00 2001 From: 1day2die Date: Wed, 1 Mar 2023 14:23:15 +0100 Subject: [PATCH 1/5] test --- app/Extensions/PaymentGateways/PayPal/index.php | 2 +- app/Extensions/PaymentGateways/PayPal/web_routes.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Extensions/PaymentGateways/PayPal/index.php b/app/Extensions/PaymentGateways/PayPal/index.php index 648913ae..a754fccc 100644 --- a/app/Extensions/PaymentGateways/PayPal/index.php +++ b/app/Extensions/PaymentGateways/PayPal/index.php @@ -23,7 +23,7 @@ use PayPalHttp\HttpException; * @param Request $request * @param ShopProduct $shopProduct */ -function PaypalPay(Request $request) +function PayPalPayment(Request $request) { /** @var User $user */ $user = Auth::user(); diff --git a/app/Extensions/PaymentGateways/PayPal/web_routes.php b/app/Extensions/PaymentGateways/PayPal/web_routes.php index 56497768..04b0c584 100644 --- a/app/Extensions/PaymentGateways/PayPal/web_routes.php +++ b/app/Extensions/PaymentGateways/PayPal/web_routes.php @@ -5,9 +5,9 @@ use Illuminate\Support\Facades\Route; include_once(__DIR__ . '/index.php'); Route::middleware(['web', 'auth'])->group(function () { - Route::get('payment/PayPalPay/{shopProduct}', function () { - PaypalPay(request()); - })->name('payment.PayPalPay'); + Route::get('payment/PayPalPayment/{shopProduct}', function () { + PayPalPayment(request()); + })->name('payment.PayPalPayment'); Route::get( 'payment/PayPalSuccess', From 869bd1e0ef823af41152b6210c2d3ad1aab00ae2 Mon Sep 17 00:00:00 2001 From: 1day2die Date: Wed, 1 Mar 2023 14:24:59 +0100 Subject: [PATCH 2/5] revert --- app/Extensions/PaymentGateways/PayPal/index.php | 2 +- app/Extensions/PaymentGateways/PayPal/web_routes.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Extensions/PaymentGateways/PayPal/index.php b/app/Extensions/PaymentGateways/PayPal/index.php index a754fccc..648913ae 100644 --- a/app/Extensions/PaymentGateways/PayPal/index.php +++ b/app/Extensions/PaymentGateways/PayPal/index.php @@ -23,7 +23,7 @@ use PayPalHttp\HttpException; * @param Request $request * @param ShopProduct $shopProduct */ -function PayPalPayment(Request $request) +function PaypalPay(Request $request) { /** @var User $user */ $user = Auth::user(); diff --git a/app/Extensions/PaymentGateways/PayPal/web_routes.php b/app/Extensions/PaymentGateways/PayPal/web_routes.php index 04b0c584..49660aa5 100644 --- a/app/Extensions/PaymentGateways/PayPal/web_routes.php +++ b/app/Extensions/PaymentGateways/PayPal/web_routes.php @@ -5,9 +5,9 @@ use Illuminate\Support\Facades\Route; include_once(__DIR__ . '/index.php'); Route::middleware(['web', 'auth'])->group(function () { - Route::get('payment/PayPalPayment/{shopProduct}', function () { - PayPalPayment(request()); - })->name('payment.PayPalPayment'); + Route::get('payment/PaypalPay/{shopProduct}', function () { + PaypalPay(request()); + })->name('payment.PaypalPay'); Route::get( 'payment/PayPalSuccess', From ad9e33d0d7ea94659bb6dfd08b77ceab1cfe8a2e Mon Sep 17 00:00:00 2001 From: Dennis Date: Thu, 9 Mar 2023 12:43:38 +0100 Subject: [PATCH 3/5] Update web_routes.php --- app/Extensions/PaymentGateways/PayPal/web_routes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Extensions/PaymentGateways/PayPal/web_routes.php b/app/Extensions/PaymentGateways/PayPal/web_routes.php index 49660aa5..56497768 100644 --- a/app/Extensions/PaymentGateways/PayPal/web_routes.php +++ b/app/Extensions/PaymentGateways/PayPal/web_routes.php @@ -5,9 +5,9 @@ use Illuminate\Support\Facades\Route; include_once(__DIR__ . '/index.php'); Route::middleware(['web', 'auth'])->group(function () { - Route::get('payment/PaypalPay/{shopProduct}', function () { + Route::get('payment/PayPalPay/{shopProduct}', function () { PaypalPay(request()); - })->name('payment.PaypalPay'); + })->name('payment.PayPalPay'); Route::get( 'payment/PayPalSuccess', From 36b784208577030add44df76dd78a9fb024d9b99 Mon Sep 17 00:00:00 2001 From: 1DayLaptop Date: Wed, 15 Mar 2023 10:48:10 +0100 Subject: [PATCH 4/5] installer new settings - Missing encryption --- public/install/forms.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/public/install/forms.php b/public/install/forms.php index 980ee3ce..6355ed06 100644 --- a/public/install/forms.php +++ b/public/install/forms.php @@ -61,14 +61,14 @@ if (isset($_POST['feedDB'])) { //$logs .= run_console(putenv('COMPOSER_HOME=' . dirname(__FILE__, 3) . '/vendor/bin/composer')); //$logs .= run_console('composer install --no-dev --optimize-autoloader'); - $logs .= run_console('php artisan migrate --seed --force'); - $logs .= run_console('php artisan db:seed --class=ExampleItemsSeeder --force'); if (strpos(getEnvironmentValue('APP_KEY'), 'base64') === false) { $logs .= run_console('php artisan key:generate --force'); } else { $logs .= "Key already exists. Skipping\n"; } $logs .= run_console('php artisan storage:link'); + $logs .= run_console('php artisan migrate --seed --force'); + $logs .= run_console('php artisan db:seed --class=ExampleItemsSeeder --force'); wh_log($logs); @@ -114,17 +114,17 @@ if (isset($_POST['checkSMTP'])) { exit(); } $values = [ - 'SETTINGS::MAIL:MAILER' => $_POST['method'], - 'SETTINGS::MAIL:HOST' => $_POST['host'], - 'SETTINGS::MAIL:PORT' => $_POST['port'], - 'SETTINGS::MAIL:USERNAME' => $_POST['user'], - 'SETTINGS::MAIL:PASSWORD' => $_POST['pass'], - 'SETTINGS::MAIL:ENCRYPTION' => $_POST['encryption'], - 'SETTINGS::MAIL:FROM_ADDRESS' => $_POST['user'], + 'mail_mailer' => $_POST['method'], + 'mail_host' => $_POST['host'], + 'mail_port' => $_POST['port'], + 'mail_username' => $_POST['user'], + 'mail_password' => $_POST['pass'], + 'mail_encryption' => $_POST['encryption'], + 'mail_from_address' => $_POST['user'], ]; foreach ($values as $key => $value) { - $query = 'UPDATE `'.getEnvironmentValue('DB_DATABASE')."`.`settings` SET `value` = '$value' WHERE (`key` = '$key')"; + $query = 'UPDATE `'.getEnvironmentValue('DB_DATABASE')."`.`settings` SET `payload` = '$value' WHERE `name` = '$key' AND `group` = mail"; $db->query($query); } @@ -177,9 +177,9 @@ if (isset($_POST['checkPtero'])) { wh_log('API CALL ERROR: '.$result['errors'][0]['code']); exit(); } else { - $query1 = 'UPDATE `'.getEnvironmentValue('DB_DATABASE')."`.`settings` SET `value` = '$url' WHERE (`key` = 'SETTINGS::SYSTEM:PTERODACTYL:URL')"; - $query2 = 'UPDATE `'.getEnvironmentValue('DB_DATABASE')."`.`settings` SET `value` = '$key' WHERE (`key` = 'SETTINGS::SYSTEM:PTERODACTYL:TOKEN')"; - $query3 = 'UPDATE `'.getEnvironmentValue('DB_DATABASE')."`.`settings` SET `value` = '$clientkey' WHERE (`key` = 'SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN')"; + $query1 = 'UPDATE `'.getEnvironmentValue('DB_DATABASE')."`.`settings` SET `payload` = '$url' WHERE (`name` = 'panel_url' AND `group` = 'pterodactyl')"; + $query2 = 'UPDATE `'.getEnvironmentValue('DB_DATABASE')."`.`settings` SET `payload` = '$key' WHERE (`name` = 'admin_token' AND `group` = 'pterodactyl')"; + $query3 = 'UPDATE `'.getEnvironmentValue('DB_DATABASE')."`.`settings` SET `payload` = '$clientkey' WHERE (`name` = 'user_token' AND `group` = 'pterodactyl')"; $db = new mysqli(getEnvironmentValue('DB_HOST'), getEnvironmentValue('DB_USERNAME'), getEnvironmentValue('DB_PASSWORD'), getEnvironmentValue('DB_DATABASE'), getEnvironmentValue('DB_PORT')); if ($db->connect_error) { @@ -209,8 +209,8 @@ if (isset($_POST['createUser'])) { $pass = $_POST['pass']; $repass = $_POST['repass']; - $key = $db->query('SELECT `value` FROM `'.getEnvironmentValue('DB_DATABASE')."`.`settings` WHERE `key` = 'SETTINGS::SYSTEM:PTERODACTYL:TOKEN'")->fetch_assoc(); - $pterobaseurl = $db->query('SELECT `value` FROM `'.getEnvironmentValue('DB_DATABASE')."`.`settings` WHERE `key` = 'SETTINGS::SYSTEM:PTERODACTYL:URL'")->fetch_assoc(); + $key = $db->query('SELECT `payload` FROM `'.getEnvironmentValue('DB_DATABASE')."`.`settings` WHERE `name` = 'admin_token' AND `group` = 'pterodactyl'")->fetch_assoc(); + $pterobaseurl = $db->query('SELECT `payload` FROM `'.getEnvironmentValue('DB_DATABASE')."`.`settings` WHERE `name` = 'panel_url' AND `group` = 'pterodactyl'")->fetch_assoc(); $pteroURL = $pterobaseurl['value'].'/api/application/users/'.$pteroID; $ch = curl_init(); From d6fe858e84da6a4ad09451f0387b4f81b47c603c Mon Sep 17 00:00:00 2001 From: 1day2die Date: Thu, 20 Apr 2023 11:43:53 +0200 Subject: [PATCH 5/5] Fix Installer CSS --- public/install/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/install/index.php b/public/install/index.php index af8b3d3e..54eb254d 100644 --- a/public/install/index.php +++ b/public/install/index.php @@ -22,7 +22,7 @@ function cardStart($title, $subtitle = null) Controlpanel.gg installer Script - +