From 863610ba942c3fedce5654782dc69bbba24df1b3 Mon Sep 17 00:00:00 2001 From: seto Date: Tue, 2 Jul 2024 16:56:48 +0900 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=94=BB=E9=9D=A2SSL?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/.env.example | 1 - plugins/baser-core/config/setting.php | 5 -- plugins/baser-core/src/BaserCorePlugin.php | 8 --- .../src/Model/Table/SiteConfigsTable.php | 10 ---- .../Model/Validation/SiteConfigValidation.php | 40 ------------- .../src/Service/SiteConfigsService.php | 3 - .../Validation/SiteConfigValidationTest.php | 59 ------------------- .../baser-core/tests/TestCase/PluginTest.php | 1 - .../Service/SiteConfigsServiceTest.php | 1 - .../src/js/admin/site_configs/index.js | 36 +---------- .../templates/Admin/SiteConfigs/index.php | 29 +-------- .../js/admin/site_configs/index.bundle.js | 2 +- .../js/admin/site_configs/index.bundle.js.map | 2 +- .../Admin/InstallationsController.php | 3 - 14 files changed, 7 insertions(+), 193 deletions(-) delete mode 100644 plugins/baser-core/src/Model/Validation/SiteConfigValidation.php delete mode 100644 plugins/baser-core/tests/TestCase/Model/Validation/SiteConfigValidationTest.php diff --git a/config/.env.example b/config/.env.example index 300eed2378..c3aa657064 100644 --- a/config/.env.example +++ b/config/.env.example @@ -24,7 +24,6 @@ export INSTALL_MODE="true" export USE_DEBUG_KIT="false" export SITE_URL="https://localhost/" export SSL_URL="https://localhost/" -export ADMIN_SSL="true" export ADMIN_PREFIX="admin" export BASER_CORE_PREFIX="baser" export SQL_LOG="false" diff --git a/plugins/baser-core/config/setting.php b/plugins/baser-core/config/setting.php index 1128f5ccc5..3d05bde08c 100644 --- a/plugins/baser-core/config/setting.php +++ b/plugins/baser-core/config/setting.php @@ -331,11 +331,6 @@ */ 'passwordRequestAllowTime' => 1440, - /** - * 管理画面のSSL - */ - 'adminSsl' => filter_var(env('ADMIN_SSL', true), FILTER_VALIDATE_BOOLEAN), - /** * エディタ */ diff --git a/plugins/baser-core/src/BaserCorePlugin.php b/plugins/baser-core/src/BaserCorePlugin.php index aa49ab0beb..4c74a8b2de 100644 --- a/plugins/baser-core/src/BaserCorePlugin.php +++ b/plugins/baser-core/src/BaserCorePlugin.php @@ -288,14 +288,6 @@ public function middleware(MiddlewareQueue $middlewareQueue): MiddlewareQueue ->add(new BcFrontMiddleware()) ->add(new BcRedirectSubSiteMiddleware()); - if (Configure::read('BcApp.adminSsl') && !BcUtil::isConsole() && BcUtil::isAdminSystem() && BcUtil::isInstalled()) { - $config = ['redirect' => false]; - if(filter_var(env('TRUST_PROXY', false))) { - $config['trustedProxies'] = !empty($_SERVER['HTTP_X_FORWARDED_FOR'])? [$_SERVER['HTTP_X_FORWARDED_FOR']] : []; - } - $middlewareQueue->add(new HttpsEnforcerMiddleware($config)); - } - // APIへのアクセスの場合、セッションによる認証以外は、CSRFを利用しない設定とする $ref = new ReflectionClass($middlewareQueue); $queue = $ref->getProperty('queue'); diff --git a/plugins/baser-core/src/Model/Table/SiteConfigsTable.php b/plugins/baser-core/src/Model/Table/SiteConfigsTable.php index 7f94263ec4..bd497be7b1 100755 --- a/plugins/baser-core/src/Model/Table/SiteConfigsTable.php +++ b/plugins/baser-core/src/Model/Table/SiteConfigsTable.php @@ -77,8 +77,6 @@ public function validationDefault(Validator $validator): Validator */ public function validationKeyValue(Validator $validator): Validator { - $validator->setProvider('siteConfig', 'BaserCore\Model\Validation\SiteConfigValidation'); - $validator ->scalar('email') ->email('email', 255, __d('baser_core', '管理者メールアドレスの形式が不正です。')) @@ -91,14 +89,6 @@ public function validationKeyValue(Validator $validator): Validator ->scalar('ssl_url') ->regex('ssl_url', '/^(http|https):/', __d('baser_core', 'WebサイトURLはURLの形式を入力してください。')) ->notEmptyString('ssl_url', __d('baser_core', 'WebサイトURLを入力してください。')); - $validator - ->scalar('admin_ssl') - ->add('admin_ssl', [ - 'adminSSlSslUrlExists' => [ - 'rule' => 'sslUrlExists', - 'provider' => 'siteConfig', - 'message' => __d('baser_core', '管理画面をSSLで利用するには、SSL用のWebサイトURLを入力してください。') - ]]); return $validator; } diff --git a/plugins/baser-core/src/Model/Validation/SiteConfigValidation.php b/plugins/baser-core/src/Model/Validation/SiteConfigValidation.php deleted file mode 100644 index 374a781b2f..0000000000 --- a/plugins/baser-core/src/Model/Validation/SiteConfigValidation.php +++ /dev/null @@ -1,40 +0,0 @@ - - * Copyright (c) NPO baser foundation - * - * @copyright Copyright (c) NPO baser foundation - * @link https://basercms.net baserCMS Project - * @since 5.0.0 - * @license https://basercms.net/license/index.html MIT License - */ - -namespace BaserCore\Model\Validation; - -use Cake\Validation\Validation; -use BaserCore\Annotation\UnitTest; -use BaserCore\Annotation\NoTodo; -use BaserCore\Annotation\Checked; - -/** - * Class SiteConfigValidation - */ -class SiteConfigValidation extends Validation -{ - - /** - * SSL用のURLが設定されているかチェックする - * @param mixed $check - * @return boolean - * @checked - * @noTodo - */ - public static function sslUrlExists($adminSsl, $context) - { - if ($adminSsl && empty($context['data']['ssl_url'])) { - return false; - } - return true; - } - -} diff --git a/plugins/baser-core/src/Service/SiteConfigsService.php b/plugins/baser-core/src/Service/SiteConfigsService.php index 9cc57c38bc..9dcfad37e8 100644 --- a/plugins/baser-core/src/Service/SiteConfigsService.php +++ b/plugins/baser-core/src/Service/SiteConfigsService.php @@ -99,7 +99,6 @@ public function get(): SiteConfig 'mode' => Configure::read('debug'), 'site_url' => Configure::read('BcEnv.siteUrl'), 'ssl_url' => Configure::read('BcEnv.sslUrl'), - 'admin_ssl' => (int)Configure::read('BcApp.adminSsl'), ]), ['validate' => 'keyValue']); } return $this->entity; @@ -141,14 +140,12 @@ public function update(array $postData) if (isset($siteConfig->mode)) $this->putEnv('DEBUG', ($siteConfig->mode)? 'true' : 'false'); if (isset($siteConfig->site_url)) $this->putEnv('SITE_URL', $siteConfig->site_url); if (isset($siteConfig->ssl_url)) $this->putEnv('SSL_URL', $siteConfig->ssl_url); - if (isset($siteConfig->admin_ssl)) $this->putEnv('ADMIN_SSL', ($siteConfig->admin_ssl)? 'true' : 'false'); } $siteConfigArray = $siteConfig->toArray(); unset($siteConfigArray['mode'], $siteConfigArray['site_url'], $siteConfigArray['ssl_url'], - $siteConfigArray['admin_ssl'], $siteConfigArray['dummy-site_url'], $siteConfigArray['dummy-ssl_url'] ); diff --git a/plugins/baser-core/tests/TestCase/Model/Validation/SiteConfigValidationTest.php b/plugins/baser-core/tests/TestCase/Model/Validation/SiteConfigValidationTest.php deleted file mode 100644 index 173388af58..0000000000 --- a/plugins/baser-core/tests/TestCase/Model/Validation/SiteConfigValidationTest.php +++ /dev/null @@ -1,59 +0,0 @@ - - * Copyright (c) NPO baser foundation - * - * @copyright Copyright (c) NPO baser foundation - * @link https://basercms.net baserCMS Project - * @since 5.0.0 - * @license https://basercms.net/license/index.html MIT License - */ - -namespace BaserCore\Test\TestCase\Model\Validation; - -use BaserCore\Model\Validation\SiteConfigValidation; -use BaserCore\TestSuite\BcTestCase; - -/** - * Class SiteConfigValidationTest - */ -class SiteConfigValidationTest extends BcTestCase -{ - - /** - * Set Up - * - * @return void - */ - public function setUp(): void - { - parent::setUp(); - } - - /** - * Tear Down - * - * @return void - */ - public function tearDown(): void - { - parent::tearDown(); - } - - /** - * エイリアスのスラッシュをチェックする - * - * - 連続してスラッシュは入力できない - * - 先頭と末尾にスラッシュは入力できない - * - * @param string $alias チェックするエイリアス - * @param array $expected 期待値 - * @param string $message テストが失敗した時に表示されるメッセージ - */ - public function testSslUrlExists() - { - $this->assertFalse(SiteConfigValidation::sslUrlExists(true, ['data' => ['admin_ssl' => '']])); - $this->assertTrue(SiteConfigValidation::sslUrlExists(false, ['data' => ['admin_ssl' => '']])); - } - -} diff --git a/plugins/baser-core/tests/TestCase/PluginTest.php b/plugins/baser-core/tests/TestCase/PluginTest.php index cf788e117c..9369c8378f 100644 --- a/plugins/baser-core/tests/TestCase/PluginTest.php +++ b/plugins/baser-core/tests/TestCase/PluginTest.php @@ -130,7 +130,6 @@ public function testBootStrap(): void export INSTALL_MODE="false" export SITE_URL="https://localhost/" export SSL_URL="https://localhost/" -export ADMIN_SSL="true" export ADMIN_PREFIX="admin" export BASER_CORE_PREFIX="baser" export SQL_LOG="false" diff --git a/plugins/baser-core/tests/TestCase/Service/SiteConfigsServiceTest.php b/plugins/baser-core/tests/TestCase/Service/SiteConfigsServiceTest.php index be7792a56d..0dac5f44ed 100644 --- a/plugins/baser-core/tests/TestCase/Service/SiteConfigsServiceTest.php +++ b/plugins/baser-core/tests/TestCase/Service/SiteConfigsServiceTest.php @@ -77,7 +77,6 @@ public function testGet() $this->assertArrayHasKey('mode', $result); $this->assertArrayHasKey('site_url', $result); $this->assertArrayHasKey('ssl_url', $result); - $this->assertArrayHasKey('admin_ssl', $result); } /** diff --git a/plugins/bc-admin-third/src/js/admin/site_configs/index.js b/plugins/bc-admin-third/src/js/admin/site_configs/index.js index 67c5eb7414..204a6e32b5 100644 --- a/plugins/bc-admin-third/src/js/admin/site_configs/index.js +++ b/plugins/bc-admin-third/src/js/admin/site_configs/index.js @@ -10,13 +10,7 @@ $(function () { - var script = $("#AdminSiteConfigsFormScript"); - var isAdminSsl = script.attr('data-isAdminSsl'); - $("#BtnSave").click(function () { - if (!isAdminSslCheck(isAdminSsl)) { - return false; - } $.bcUtil.showLoader(); }); @@ -25,7 +19,7 @@ $(function () { // SMTP送信テスト $("#BtnCheckSendmail").click(function () { - if (!confirm(bcI18n.confirmMessage2)) { + if (!confirm(bcI18n.confirmMessage1)) { return false; } $.bcToken.check(function () { @@ -47,7 +41,7 @@ $(function () { } else { errorMessage = errorThrown; } - $("#ResultCheckSendmail").html(bcI18n.alertMessage2 + errorMessage); + $("#ResultCheckSendmail").html(bcI18n.alertMessage1 + errorMessage); }, complete: function () { $("#ResultCheckSendmail").show(); @@ -58,32 +52,6 @@ $(function () { return false; }); - /** - * 管理画面SSLチェック - * @param isAdminSsl - * @returns {boolean} - */ - function isAdminSslCheck(isAdminSsl) { - if (isAdminSsl === "0" && $("input[name='admin_ssl']:checked").val() === "1") { - if (!$("#SiteConfigSslUrl").val()) { - alert(bcI18n.alertMessage1); - window.location.hash = 'ssl-url'; - return false; - } - $.bcConfirm.show({ - title: bcI18n.confirmTitle1, - message: bcI18n.confirmMessage1, - defaultCancel: true, - ok: function () { - $.bcUtil.showLoader(); - $("#SiteConfigFormForm").submit(); - } - }); - return false; - } - return true; - } - /** * エディタ切替時イベント */ diff --git a/plugins/bc-admin-third/templates/Admin/SiteConfigs/index.php b/plugins/bc-admin-third/templates/Admin/SiteConfigs/index.php index 185d604230..58bb2c2804 100755 --- a/plugins/bc-admin-third/templates/Admin/SiteConfigs/index.php +++ b/plugins/bc-admin-third/templates/Admin/SiteConfigs/index.php @@ -26,16 +26,12 @@ $this->BcAdmin->setTitle(__d('baser_core', 'システム基本設定')); $this->BcAdmin->setHelp('site_configs_form'); $this->BcBaser->i18nScript([ - 'alertMessage1' => __d('baser_core', '管理システムをSSLに切り替える場合には、SSL用のURLを登録してください。'), - 'alertMessage2' => __d('baser_core', 'テストメールを送信に失敗しました。'), - 'confirmMessage1' => __d('baser_core', '管理システムをSSLに切り替えようとしています。よろしいですか?

サーバがSSLに対応していない場合、管理システムを表示する事ができなくなってしまいますのでご注意ください。

もし、表示する事ができなくなってしまった場合は、 /app/Config/install.php の、 BcEnv.sslUrl の値を調整するか、BcApp.adminSsl の値を false に書き換えて復旧してください。'), - 'confirmMessage2' => __d('baser_core', 'テストメールを送信します。いいですか?'), + 'alertMessage1' => __d('baser_core', 'テストメールの送信に失敗しました。'), + 'confirmMessage1' => __d('baser_core', 'テストメールを送信します。よろしいですか?'), 'infoMessage1' => __d('baser_core', 'テストメールを送信しました。'), 'confirmTitle1' => __d('baser_core', '管理システムSSL設定確認') ], ['escape' => false]); -$this->BcBaser->js('admin/site_configs/index.bundle', false, ['id' => 'AdminSiteConfigsFormScript', - 'data-isAdminSsl' => (string)$siteConfig->admin_ssl -]); +$this->BcBaser->js('admin/site_configs/index.bundle', false); ?> @@ -139,25 +135,6 @@
- - - -
- BcAdminForm->label('admin_ssl', __d('baser_core', '管理画面SSL設定')) ?> - - BcAdminForm->control('admin_ssl', [ - 'type' => 'radio', - 'options' => $this->BcText->booleanDoList(__d('baser_core', 'SSL通信を利用')), - 'separator' => ' ', - 'legend' => false, - 'disabled' => !$isWritableEnv - ]) ?> - -
- また、SSL用のWebサイトURLの指定が必要です。') ?> -
- BcAdminForm->error('admin_ssl') ?> -
BcAdminForm->label('admin_list_num', __d('baser_core', '管理画面テーマ')) ?> diff --git a/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js b/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js index ae40ea2512..1c3c41bba4 100644 --- a/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js +++ b/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js @@ -7,5 +7,5 @@ * @since 5.0.0 * @license https://basercms.net/license/index.html MIT License */ -$((function(){var e=$("#AdminSiteConfigsFormScript").attr("data-isAdminSsl");function n(){"BaserCore.BcCkeditor"===$('input[name="editor"]:checked').val()?$(".ckeditor-option").show():$(".ckeditor-option").hide()}$("#BtnSave").click((function(){if(!function(e){return"0"!==e||"1"!==$("input[name='admin_ssl']:checked").val()||($("#SiteConfigSslUrl").val()?($.bcConfirm.show({title:bcI18n.confirmTitle1,message:bcI18n.confirmMessage1,defaultCancel:!0,ok:function(){$.bcUtil.showLoader(),$("#SiteConfigFormForm").submit()}}),!1):(alert(bcI18n.alertMessage1),window.location.hash="ssl-url",!1))}(e))return!1;$.bcUtil.showLoader()})),$('input[name="editor"]').click(n),n(),$("#BtnCheckSendmail").click((function(){return!!confirm(bcI18n.confirmMessage2)&&($.bcToken.check((function(){return $.ajax({type:"POST",url:$.bcUtil.apiAdminBaseUrl+"baser-core/site_configs/check_sendmail.json",data:$("#SiteConfigFormForm").serialize(),beforeSend:function(){$("#ResultCheckSendmail").hide(),$("#AjaxLoaderCheckSendmail").show()},success:function(e){$("#ResultCheckSendmail").html(bcI18n.infoMessage1)},error:function(e,n,i){var o="";o=e.responseJSON.message?e.responseJSON.message:i,$("#ResultCheckSendmail").html(bcI18n.alertMessage2+o)},complete:function(){$("#ResultCheckSendmail").show(),$("#AjaxLoaderCheckSendmail").hide()}})}),{loaderType:"none"}),!1)}))})); +$((function(){function e(){"BaserCore.BcCkeditor"===$('input[name="editor"]:checked').val()?$(".ckeditor-option").show():$(".ckeditor-option").hide()}$("#BtnSave").click((function(){$.bcUtil.showLoader()})),$('input[name="editor"]').click(e),e(),$("#BtnCheckSendmail").click((function(){return!!confirm(bcI18n.confirmMessage1)&&($.bcToken.check((function(){return $.ajax({type:"POST",url:$.bcUtil.apiAdminBaseUrl+"baser-core/site_configs/check_sendmail.json",data:$("#SiteConfigFormForm").serialize(),beforeSend:function(){$("#ResultCheckSendmail").hide(),$("#AjaxLoaderCheckSendmail").show()},success:function(e){$("#ResultCheckSendmail").html(bcI18n.infoMessage1)},error:function(e,n,i){var c="";c=e.responseJSON.message?e.responseJSON.message:i,$("#ResultCheckSendmail").html(bcI18n.alertMessage1+c)},complete:function(){$("#ResultCheckSendmail").show(),$("#AjaxLoaderCheckSendmail").hide()}})}),{loaderType:"none"}),!1)}))})); //# sourceMappingURL=index.bundle.js.map \ No newline at end of file diff --git a/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js.map b/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js.map index 43df226151..f6ac1efb2c 100644 --- a/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js.map +++ b/plugins/bc-admin-third/webroot/js/admin/site_configs/index.bundle.js.map @@ -1 +1 @@ -{"version":3,"file":"js/admin/site_configs/index.bundle.js","mappings":";;;;;;;;;AAUAA,GAAE,WAEE,IACIC,EADSD,EAAE,+BACSE,KAAK,mBA4E7B,SAASC,IAC2C,yBAA5CH,EAAE,gCAAgCI,MAClCJ,EAAE,oBAAoBK,OAEtBL,EAAE,oBAAoBM,MAE9B,CAhFAN,EAAE,YAAYO,OAAM,WAChB,IAiDJ,SAAyBN,GACrB,MAAmB,MAAfA,GAAqE,MAA/CD,EAAE,mCAAmCI,QACtDJ,EAAE,qBAAqBI,OAK5BJ,EAAEQ,UAAUH,KAAK,CACbI,MAAOC,OAAOC,cACdC,QAASF,OAAOG,gBAChBC,eAAe,EACfC,GAAI,WACAf,EAAEgB,OAAOC,aACTjB,EAAE,uBAAuBkB,QAC7B,KAEG,IAbHC,MAAMT,OAAOU,eACbC,OAAOC,SAASC,KAAO,WAChB,GAcnB,CApESC,CAAgBvB,GACjB,OAAO,EAEXD,EAAEgB,OAAOC,YACb,IAEAjB,EAAE,wBAAwBO,MAAMJ,GAChCA,IAGAH,EAAE,qBAAqBO,OAAM,WACzB,QAAKkB,QAAQf,OAAOgB,mBAGpB1B,EAAE2B,QAAQC,OAAM,WACZ,OAAO5B,EAAE6B,KAAK,CACVC,KAAM,OACNC,IAAK/B,EAAEgB,OAAOgB,gBAAkB,8CAChCC,KAAMjC,EAAE,uBAAuBkC,YAC/BC,WAAY,WACRnC,EAAE,wBAAwBM,OAC1BN,EAAE,4BAA4BK,MAClC,EACA+B,QAAS,SAAUC,GACfrC,EAAE,wBAAwBsC,KAAK5B,OAAO6B,aAC1C,EACAC,MAAO,SAAUC,EAAgBC,EAAYC,GACzC,IAAIC,EAAe,GAEfA,EADAH,EAAeI,aAAajC,QACb6B,EAAeI,aAAajC,QAE5B+B,EAEnB3C,EAAE,wBAAwBsC,KAAK5B,OAAOoC,cAAgBF,EAC1D,EACAG,SAAU,WACN/C,EAAE,wBAAwBK,OAC1BL,EAAE,4BAA4BM,MAClC,GAER,GAAG,CAAC0C,WAAY,UACT,EACX,GAuCJ","sources":["webpack://bc-admin-third/./src/js/admin/site_configs/index.js"],"sourcesContent":["/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n$(function () {\n\n var script = $(\"#AdminSiteConfigsFormScript\");\n var isAdminSsl = script.attr('data-isAdminSsl');\n\n $(\"#BtnSave\").click(function () {\n if (!isAdminSslCheck(isAdminSsl)) {\n return false;\n }\n $.bcUtil.showLoader();\n });\n\n $('input[name=\"editor\"]').click(siteConfigEditorClickHandler);\n siteConfigEditorClickHandler();\n\n // SMTP送信テスト\n $(\"#BtnCheckSendmail\").click(function () {\n if (!confirm(bcI18n.confirmMessage2)) {\n return false;\n }\n $.bcToken.check(function () {\n return $.ajax({\n type: 'POST',\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/site_configs/check_sendmail.json',\n data: $(\"#SiteConfigFormForm\").serialize(),\n beforeSend: function () {\n $(\"#ResultCheckSendmail\").hide();\n $(\"#AjaxLoaderCheckSendmail\").show();\n },\n success: function (result) {\n $(\"#ResultCheckSendmail\").html(bcI18n.infoMessage1);\n },\n error: function (XMLHttpRequest, textStatus, errorThrown) {\n var errorMessage = '';\n if (XMLHttpRequest.responseJSON.message) {\n errorMessage = XMLHttpRequest.responseJSON.message;\n } else {\n errorMessage = errorThrown;\n }\n $(\"#ResultCheckSendmail\").html(bcI18n.alertMessage2 + errorMessage);\n },\n complete: function () {\n $(\"#ResultCheckSendmail\").show();\n $(\"#AjaxLoaderCheckSendmail\").hide();\n }\n });\n }, {loaderType: 'none'});\n return false;\n });\n\n /**\n * 管理画面SSLチェック\n * @param isAdminSsl\n * @returns {boolean}\n */\n function isAdminSslCheck(isAdminSsl) {\n if (isAdminSsl === \"0\" && $(\"input[name='admin_ssl']:checked\").val() === \"1\") {\n if (!$(\"#SiteConfigSslUrl\").val()) {\n alert(bcI18n.alertMessage1);\n window.location.hash = 'ssl-url';\n return false;\n }\n $.bcConfirm.show({\n title: bcI18n.confirmTitle1,\n message: bcI18n.confirmMessage1,\n defaultCancel: true,\n ok: function () {\n $.bcUtil.showLoader();\n $(\"#SiteConfigFormForm\").submit();\n }\n });\n return false;\n }\n return true;\n }\n\n /**\n * エディタ切替時イベント\n */\n function siteConfigEditorClickHandler() {\n if ($('input[name=\"editor\"]:checked').val() === 'BaserCore.BcCkeditor') {\n $(\".ckeditor-option\").show();\n } else {\n $(\".ckeditor-option\").hide();\n }\n }\n\n});\n"],"names":["$","isAdminSsl","attr","siteConfigEditorClickHandler","val","show","hide","click","bcConfirm","title","bcI18n","confirmTitle1","message","confirmMessage1","defaultCancel","ok","bcUtil","showLoader","submit","alert","alertMessage1","window","location","hash","isAdminSslCheck","confirm","confirmMessage2","bcToken","check","ajax","type","url","apiAdminBaseUrl","data","serialize","beforeSend","success","result","html","infoMessage1","error","XMLHttpRequest","textStatus","errorThrown","errorMessage","responseJSON","alertMessage2","complete","loaderType"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"js/admin/site_configs/index.bundle.js","mappings":";;;;;;;;;AAUAA,GAAE,WA+CE,SAASC,IAC2C,yBAA5CD,EAAE,gCAAgCE,MAClCF,EAAE,oBAAoBG,OAEtBH,EAAE,oBAAoBI,MAE9B,CAnDAJ,EAAE,YAAYK,OAAM,WAChBL,EAAEM,OAAOC,YACb,IAEAP,EAAE,wBAAwBK,MAAMJ,GAChCA,IAGAD,EAAE,qBAAqBK,OAAM,WACzB,QAAKG,QAAQC,OAAOC,mBAGpBV,EAAEW,QAAQC,OAAM,WACZ,OAAOZ,EAAEa,KAAK,CACVC,KAAM,OACNC,IAAKf,EAAEM,OAAOU,gBAAkB,8CAChCC,KAAMjB,EAAE,uBAAuBkB,YAC/BC,WAAY,WACRnB,EAAE,wBAAwBI,OAC1BJ,EAAE,4BAA4BG,MAClC,EACAiB,QAAS,SAAUC,GACfrB,EAAE,wBAAwBsB,KAAKb,OAAOc,aAC1C,EACAC,MAAO,SAAUC,EAAgBC,EAAYC,GACzC,IAAIC,EAAe,GAEfA,EADAH,EAAeI,aAAaC,QACbL,EAAeI,aAAaC,QAE5BH,EAEnB3B,EAAE,wBAAwBsB,KAAKb,OAAOsB,cAAgBH,EAC1D,EACAI,SAAU,WACNhC,EAAE,wBAAwBG,OAC1BH,EAAE,4BAA4BI,MAClC,GAER,GAAG,CAAC6B,WAAY,UACT,EACX,GAaJ","sources":["webpack://bc-admin-third/./src/js/admin/site_configs/index.js"],"sourcesContent":["/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\n\n$(function () {\n\n $(\"#BtnSave\").click(function () {\n $.bcUtil.showLoader();\n });\n\n $('input[name=\"editor\"]').click(siteConfigEditorClickHandler);\n siteConfigEditorClickHandler();\n\n // SMTP送信テスト\n $(\"#BtnCheckSendmail\").click(function () {\n if (!confirm(bcI18n.confirmMessage1)) {\n return false;\n }\n $.bcToken.check(function () {\n return $.ajax({\n type: 'POST',\n url: $.bcUtil.apiAdminBaseUrl + 'baser-core/site_configs/check_sendmail.json',\n data: $(\"#SiteConfigFormForm\").serialize(),\n beforeSend: function () {\n $(\"#ResultCheckSendmail\").hide();\n $(\"#AjaxLoaderCheckSendmail\").show();\n },\n success: function (result) {\n $(\"#ResultCheckSendmail\").html(bcI18n.infoMessage1);\n },\n error: function (XMLHttpRequest, textStatus, errorThrown) {\n var errorMessage = '';\n if (XMLHttpRequest.responseJSON.message) {\n errorMessage = XMLHttpRequest.responseJSON.message;\n } else {\n errorMessage = errorThrown;\n }\n $(\"#ResultCheckSendmail\").html(bcI18n.alertMessage1 + errorMessage);\n },\n complete: function () {\n $(\"#ResultCheckSendmail\").show();\n $(\"#AjaxLoaderCheckSendmail\").hide();\n }\n });\n }, {loaderType: 'none'});\n return false;\n });\n\n /**\n * エディタ切替時イベント\n */\n function siteConfigEditorClickHandler() {\n if ($('input[name=\"editor\"]:checked').val() === 'BaserCore.BcCkeditor') {\n $(\".ckeditor-option\").show();\n } else {\n $(\".ckeditor-option\").hide();\n }\n }\n\n});\n"],"names":["$","siteConfigEditorClickHandler","val","show","hide","click","bcUtil","showLoader","confirm","bcI18n","confirmMessage1","bcToken","check","ajax","type","url","apiAdminBaseUrl","data","serialize","beforeSend","success","result","html","infoMessage1","error","XMLHttpRequest","textStatus","errorThrown","errorMessage","responseJSON","message","alertMessage1","complete","loaderType"],"sourceRoot":""} \ No newline at end of file diff --git a/plugins/bc-installer/src/Controller/Admin/InstallationsController.php b/plugins/bc-installer/src/Controller/Admin/InstallationsController.php index 2e7922fb48..b2eaa34c47 100644 --- a/plugins/bc-installer/src/Controller/Admin/InstallationsController.php +++ b/plugins/bc-installer/src/Controller/Admin/InstallationsController.php @@ -204,9 +204,6 @@ public function step5(InstallationsAdminServiceInterface $service) /** @var SiteConfigsServiceInterface $siteConfigsService */ $siteConfigsService = $this->getService(SiteConfigsServiceInterface::class); $siteConfigsService->putEnv('INSTALL_MODE', 'false'); - if(!$this->getRequest()->is('https')) { - $siteConfigsService->putEnv('ADMIN_SSL', 'false'); - } BcUtil::clearAllCache(); if (function_exists('opcache_reset')) opcache_reset();