diff --git a/.github/workflows/vaddy/prepare/action.yml b/.github/workflows/vaddy/prepare/action.yml new file mode 100644 index 00000000000..1c6752edbee --- /dev/null +++ b/.github/workflows/vaddy/prepare/action.yml @@ -0,0 +1,161 @@ +name: 'Prepare VAddy' +on: + workflow_call: + +inputs: + vaddy-verification-code: + description: 'VAddy verification code' + required: true + type: string + vaddy-fqdn: + description: 'VAddy FQDN' + required: true + type: string + vaddy-user: + description: 'VAddy USER' + required: true + type: string + vaddy-auth-key: + description: 'VAddy AUTH key' + required: true + type: string + +runs: + using: "composite" + steps: + + - name: Setup PHP + uses: nanasess/setup-php@master + with: + php-version: '7.4' + + - name: setup-chromedriver + uses: nanasess/setup-chromedriver@master + + - name: Install fonts + shell: bash + run: sudo apt install fonts-noto + + - name: "VAddy: install" + working-directory: /tmp + shell: bash + run: | + wget -q https://github.com/vaddy/go-vaddy/archive/master.zip + unzip master.zip + echo 'export VADDY_AUTH_KEY="${{ inputs.vaddy-auth-key }}" + export VADDY_FQDN="${{ inputs.vaddy-fqdn }}" + export VADDY_VERIFICATION_CODE="${{ inputs.vaddy-verification-code }}" + export VADDY_USER="${{ inputs.vaddy-user }}" + export VADDY_YOUR_LOCAL_IP="127.0.0.1" + export VADDY_YOUR_LOCAL_PORT="8080" + export VADDY_HTTPS_PROXY=""' > go-vaddy-master/privatenet/conf/vaddy.conf + mkdir -p ${HOME}/.ssh + echo 'Host *.vaddy.net + StrictHostKeyChecking no' >> ${HOME}/.ssh/config + + - name: Get Composer Cache Directory + id: composer-cache + shell: bash + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + + - uses: actions/cache@v1 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- + + - name: "EC-CUBE: setup" + shell: bash + env: + DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db + DATABASE_SERVER_VERSION: 14 + run: | + composer install --no-scripts --no-dev --no-interaction --optimize-autoloader --no-plugins + php bin/template_jp.php + rm -rf app/Plugin/* + echo 'getEntityManager()->detach($event->getEntity()); + } + }' > src/Eccube/Doctrine/EventSubscriber/CancelDeletionEventSubscriber.php + sed -i.bak -e 's_$fs->remove_// $fs->remove_' src/Eccube/Controller/Admin/Content/PageController.php + rm -f app/config/eccube/packages/dev/web_profiler.yaml + sed -i -e "s/eccube_login_throttling_max_attempts: 5/eccube_login_throttling_max_attempts: 1024/" -e "s/eccube_login_throttling_interval: '30 minutes'/eccube_login_throttling_interval: '1 minutes'/" app/config/eccube/packages/eccube.yaml + rm -f app/config/eccube/packages/prod/eccube_rate_limiter.yaml + sed -i -e 's/30 min/1 min/g' app/config/eccube/packages/eccube_rate_limiter.yaml + bin/console cache:clear + bin/console debug:container --parameter eccube_login_throttling_max_attempts + bin/console debug:container --parameter eccube_login_throttling_interval + bin/console debug:config eccube + bin/console doctrine:database:create --env=dev + bin/console doctrine:schema:create --env=dev + bin/console eccube:fixtures:load --env=dev + chmod -R 777 html + + - name: Setup Plugins + shell: bash + env: + APP_ENV: 'prod' + DATABASE_URL: postgres://postgres:password@127.0.0.1:5432/eccube_db + DATABASE_SERVER_VERSION: 14 + PGPASSWORD: 'password' + run: | + bin/console eccube:composer:require "ec-cube/recommend42" + bin/console eccube:composer:require "ec-cube/coupon42" + bin/console eccube:composer:require "ec-cube/mailmagazine42" + bin/console eccube:composer:require "ec-cube/salesreport42" + bin/console eccube:composer:require "ec-cube/relatedproduct42" + bin/console eccube:composer:require "ec-cube/securitychecker42" + bin/console eccube:composer:require "ec-cube/productreview42" + bin/console eccube:composer:require "ec-cube/api42" + bin/console eccube:composer:require "ec-cube/sitekit42" + psql eccube_db -h 127.0.0.1 -U postgres -c "select id,name,code,0 as enabled,version,source,0 as initialized,'2021-08-13 00:00:00' as create_date,'2021-08-13 00:00:00' as update_date,discriminator_type from dtb_plugin;" -A -F, --pset footer > src/Eccube/Resource/doctrine/import_csv/ja/dtb_plugin.csv + + - name: "EC-CUBE: package" + shell: bash + working-directory: ../ + run: ${{ github.event.repository.name }}/package.sh + + - name: "EC-CUBE: build" + shell: bash + run: docker build -t ec-cube . + + - name: "Codeception: prepare" + shell: bash + run: | + echo "APP_ENV=codeception" > .env + export DISPLAY=:99 + chromedriver --url-base=/wd/hub & + echo ">>> Started chrome-driver" + sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & + echo ">>> Started xvfb" + composer install --no-scripts --no-interaction --optimize-autoloader + sudo echo "127.0.0.1 ${{ inputs.vaddy-fqdn }}" | sudo tee -a /etc/hosts + echo "modules: + config: + WebDriver: + host: '127.0.0.1' + port: 9515 + url: "http://${{ inputs.vaddy-fqdn }}:8080" + browser: chrome + capabilities: + chromeOptions: + args: ["--headless", "--disable-gpu"] + prefs: + download.default_directory: '%PWD%/codeception/_support/_downloads' + MailCatcher: + url: '172.17.0.1' + port: 1080" > codeception/_envs/local.yml diff --git a/.github/workflows/vaddy/scan/action.yml b/.github/workflows/vaddy/scan/action.yml new file mode 100644 index 00000000000..179eae0da04 --- /dev/null +++ b/.github/workflows/vaddy/scan/action.yml @@ -0,0 +1,97 @@ +name: 'Run VAddy scan' +on: + workflow_call: + +inputs: + command: + description: 'codeception command' + required: true + vaddy-verification-code: + description: 'VAddy verification code' + required: true + type: string + vaddy-proxy: + description: 'VAddy proxy' + required: true + type: string + vaddy-proxy-port: + description: 'VAddy proxy port number' + required: true + type: string + vaddy-fqdn: + description: 'VAddy FQDN' + required: true + type: string + +runs: + using: "composite" + steps: + - name: "EC-CUBE: run" + shell: bash + run: | + docker run \ + -e APP_ENV=prod \ + -e APP_DEBUG=0 \ + -e DATABASE_URL="postgres://postgres:password@172.17.0.1:5432/eccube_db" \ + -e DATABASE_SERVER_VERSION=14 \ + -e MAILER_URL="smtp://172.17.0.1:1025" \ + -v ${PWD}/html:/tmp/html \ + --rm -d -p 8080:80 --name eccube ec-cube + until [ $(docker inspect -f {{.State.Health.Status}} eccube) != "starting" ]; do + echo -n . + sleep 10; + done; + docker cp ../eccube.tar.gz eccube:/tmp/ + docker exec -w /tmp eccube bash -c "rm -rf /var/www/html; tar xf /tmp/eccube.tar.gz -C /var/www; mv /var/www/ec-cube /var/www/html; chown -R www-data: /var/www/html" + docker exec eccube bash -c "rm -rf /var/www/html/html; ln -s /tmp/html /var/www/html/html;" + docker exec -u www-data eccube bin/console eccube:install -n + docker exec -u www-data -e VADDY_VERIFICATION_CODE=${{ inputs.vaddy-verification-code }} eccube bash -c 'echo ${VADDY_VERIFICATION_CODE} > vaddy-${VADDY_VERIFICATION_CODE}.html' + docker exec -u www-data eccube bash -c 'for code in Api42 Coupon42 MailMagazine42 ProductReview42 Recommend42 RelatedProduct42 SalesReport42 Securitychecker42 SiteKit42; do bin/console eccube:plugin:enable --code $code; done' + + - name: "VAddy: connect" + shell: bash + working-directory: /tmp/go-vaddy-master/privatenet + run: ./vaddy_privatenet.sh connect + + - name: "VAddy: crawl" + shell: bash + env: + APP_ENV: "codeception" + DATABASE_URL: "postgres://postgres:password@127.0.0.1:5432/eccube_db" + DATABASE_SERVER_VERSION: "14" + MAILER_URL: "smtp://127.0.0.1:1025" + BASE_URL: "http://${{ inputs.vaddy-fqdn }}:8080" + VADDY_PROXY: "${{ inputs.vaddy-proxy }}" + VADDY_PROXY_PORT: "${{ inputs.vaddy-proxy-port }}" + VADDY_VERIFICATION_CODE: "${{ inputs.vaddy-verification-code }}" + VADDY_CRAWL: "${{ inputs.command }}" + run: | + vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:begin + vendor/bin/codecept -vvv run -g vaddy acceptance --env chrome,local,vaddy --html report.html ${{ inputs.command }} || true + vendor/bin/codecept -vvv run acceptance --env chrome,local,vaddy VaddyCest:commit + + - name: Upload report + uses: actions/upload-artifact@v2 + with: + name: crawl-reports + path: codeception/_output/**/* + + - name: "VAddy: disconnect" + shell: bash + if: ${{ always() }} + working-directory: /tmp/go-vaddy-master/privatenet + run: ./vaddy_privatenet.sh disconnect + + - name: "VAddy: scan" + shell: bash + continue-on-error: true + env: + VADDY_CRAWL: "${{ inputs.command }}" + working-directory: /tmp/go-vaddy-master/privatenet + run: ./vaddy_privatenet.sh scan + + - name: "EC-CUBE: stop" + shell: bash + if: ${{ always() }} + continue-on-error: true + run: docker rm -f -v eccube \ No newline at end of file diff --git a/.github/workflows/vaddyscan.yml b/.github/workflows/vaddyscan.yml new file mode 100644 index 00000000000..a722c4d4a75 --- /dev/null +++ b/.github/workflows/vaddyscan.yml @@ -0,0 +1,194 @@ +name: VAddy-test +on: push +jobs: + vaddy: + name: VAddy + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + include: +# - vaddy_project: 'ADMIN01' +# command1: 'EA03ProductCest' +# command2: 'EA05CustomerCest' +# command3: 'EA04OrderCest:order_個別出荷済みステータス変更' +# command4: 'EA04OrderCest:order_納品書の一括出力' +# command5: 'EA04OrderCest:order_受注メール通知' +# command6: 'EA04OrderCest:order_受注削除' +# command7: 'EA04OrderCest:order_受注CSVダウンロード' +# command8: 'EA04OrderCest:order_受注登録' +# command9: 'EA06ContentsManagementCest' +# - vaddy_project: 'ADMIN02' +# command1: 'EA04OrderCest:order_受注編集' +# - vaddy_project: 'FRONT' +# command1: ' -x delivery -x basicsetting -x taxrule -x mailsetting -x csvsetting -x orderstatus -x pluginauth EA07BasicinfoCest' +# command2: '-x paymentmethod -x basicsetting -x taxrule -x mailsetting -x csvsetting -x orderstatus -x pluginauth EA07BasicinfoCest' +# command3: '-x paymentmethod -x delivery -x mailsetting -x csvsetting -x orderstatus EA07BasicinfoCest' +# - vaddy_project: 'ADMIN01' +# command1: '-x paymentmethod -x delivery -x basicsetting -x taxrule -x orderstatus -x pluginauth EA07BasicinfoCest' +# command2: '-x paymentmethod -x delivery -x basicsetting -x taxrule -x mailsetting -x csvsetting -x pluginauth EA07BasicinfoCest' +# - vaddy_project: 'ADMIN02' // 時間オーバー +# command1: '-x admin -x plugin -x order' +# - vaddy_project: 'FRONT' +# command1: 'EF03OrderCest:order_ログインユーザ購入複数配送' +# command2: 'EF03OrderCest:order_ログインしてカートをマージ' +# command3: 'EF03OrderCest:order_カート数量減らす' +# - vaddy_project: 'ADMIN01' +# command1: 'EF03OrderCest:order_カート数量増やす' +# command2: 'EF03OrderCest:order_ゲスト購入情報変更' +# - vaddy_project: 'ADMIN02' +# command1: '-x admin -x front' +# command2: 'EA09ShippingCest' +# - vaddy_project: 'FRONT' +# command1: 'EF03OrderCest:order_ログインユーザ購入複数配送' +# command2: 'EF03OrderCest:order_ログインしてカートをマージ' +# command3: 'EF03OrderCest:order_カート数量減らす' +# - vaddy_project: 'ADMIN01' +# command1: 'EF03OrderCest:order_カート数量増やす' +# command2: 'EF03OrderCest:order_ゲスト購入情報変更' +# - vaddy_project: 'ADMIN02' +# command1: 'EA08SysteminfoCest' +# - vaddy_project: 'FRONT' +# command1: 'EF03OrderCest:order_ゲスト購入' +# - vaddy_project: 'ADMIN01' +# command1: 'EF01TopCest:topページ_初期表示' +# command2: 'EF02ProductCest:product_商品一覧ソート' +# command3: 'EF02ProductCest:product_商品詳細カート4' +# - vaddy_project: 'ADMIN02' +# command1: 'EF04CustomerCest:customer_会員登録正常' +# command2: 'EF04CustomerCest:customer_会員登録利用規約' +# - vaddy_project: 'FRONT' +# command1: 'EF05MypageCest:mypage_ご注文履歴詳細' +# command2: 'EF05MypageCest:mypage_お気に入り一覧' +# command3: 'EF05MypageCest:mypage_会員情報編集' +# command4: 'EF05MypageCest:mypage_お届け先編集作成変更' +# command5: 'EF05MypageCest:mypage_お届け先編集削除' +# command6: 'EF05MypageCest:mypage_退会手続き未実施' + - vaddy_project: 'ADMIN01' + command1: 'EF06OtherCest:other_パスワード再発行' + command2: 'EF06OtherCest:other_ログアウト' + command3: 'EF06OtherCest:other_当サイトについて' + command4: 'EF06OtherCest:other_プライバシーポリシー' + command5: 'EF06OtherCest:other_特定商取引法に基づく表記' + command6: 'EF06OtherCest:other_お問い合わせ1' + services: + postgres: + image: postgres:14 + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: password + ports: + - 5432:5432 + # needed because the postgres container does not provide a healthcheck + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + mailcatcher: + image: schickling/mailcatcher + ports: + - 1080:1080 + - 1025:1025 + steps: + - name: Checkout + uses: actions/checkout@master + + - name: "Prepare" + uses: ./.github/workflows/vaddy/prepare + with: + vaddy-verification-code: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" + vaddy-fqdn: "${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" + vaddy-user: "${{ secrets.VADDY_USER }}" + vaddy-auth-key: "${{ secrets.VADDY_AUTH_KEY }}" + + - name: "Scan 1" + if: ${{ matrix.command1 != '' }} + uses: ./.github/workflows/vaddy/scan + with: + command: "${{ matrix.command1 }}" + vaddy-verification-code: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" + vaddy-proxy: "${{ secrets.VADDY_PROXY }}" + vaddy-proxy-port: "${{ secrets.VADDY_PROXY_PORT }}" + vaddy-fqdn: "${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" + + - name: "Scan 2" + if: ${{ matrix.command2 != '' }} + uses: ./.github/workflows/vaddy/scan + with: + command: "${{ matrix.command2 }}" + vaddy-verification-code: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" + vaddy-proxy: "${{ secrets.VADDY_PROXY }}" + vaddy-proxy-port: "${{ secrets.VADDY_PROXY_PORT }}" + vaddy-fqdn: "${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" + + - name: "Scan 3" + if: ${{ matrix.command3 != '' }} + uses: ./.github/workflows/vaddy/scan + with: + command: "${{ matrix.command3 }}" + vaddy-verification-code: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" + vaddy-proxy: "${{ secrets.VADDY_PROXY }}" + vaddy-proxy-port: "${{ secrets.VADDY_PROXY_PORT }}" + vaddy-fqdn: "${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" + + - name: "Scan 4" + if: ${{ matrix.command4 != '' }} + uses: ./.github/workflows/vaddy/scan + with: + command: "${{ matrix.command4 }}" + vaddy-verification-code: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" + vaddy-proxy: "${{ secrets.VADDY_PROXY }}" + vaddy-proxy-port: "${{ secrets.VADDY_PROXY_PORT }}" + vaddy-fqdn: "${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" + + - name: "Scan 5" + if: ${{ matrix.command5 != '' }} + uses: ./.github/workflows/vaddy/scan + with: + command: "${{ matrix.command5 }}" + vaddy-verification-code: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" + vaddy-proxy: "${{ secrets.VADDY_PROXY }}" + vaddy-proxy-port: "${{ secrets.VADDY_PROXY_PORT }}" + vaddy-fqdn: "${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" + + - name: "Scan 6" + if: ${{ matrix.command6 != '' }} + uses: ./.github/workflows/vaddy/scan + with: + command: "${{ matrix.command6 }}" + vaddy-verification-code: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" + vaddy-proxy: "${{ secrets.VADDY_PROXY }}" + vaddy-proxy-port: "${{ secrets.VADDY_PROXY_PORT }}" + vaddy-fqdn: "${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" + + - name: "Scan 7" + if: ${{ matrix.command7 != '' }} + uses: ./.github/workflows/vaddy/scan + with: + command: "${{ matrix.command7 }}" + vaddy-verification-code: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" + vaddy-proxy: "${{ secrets.VADDY_PROXY }}" + vaddy-proxy-port: "${{ secrets.VADDY_PROXY_PORT }}" + vaddy-fqdn: "${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" + + - name: "Scan 8" + if: ${{ matrix.command8 != '' }} + uses: ./.github/workflows/vaddy/scan + with: + command: "${{ matrix.command8 }}" + vaddy-verification-code: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" + vaddy-proxy: "${{ secrets.VADDY_PROXY }}" + vaddy-proxy-port: "${{ secrets.VADDY_PROXY_PORT }}" + vaddy-fqdn: "${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" + + - name: "Scan 9" + if: ${{ matrix.command9 != '' }} + uses: ./.github/workflows/vaddy/scan + with: + command: "${{ matrix.command9 }}" + vaddy-verification-code: "${{ secrets[format('{0}{1}', 'VADDY_VERIFICATION_CODE_', matrix.vaddy_project)] }}" + vaddy-proxy: "${{ secrets.VADDY_PROXY }}" + vaddy-proxy-port: "${{ secrets.VADDY_PROXY_PORT }}" + vaddy-fqdn: "${{ secrets[format('{0}{1}', 'VADDY_FQDN_', matrix.vaddy_project)] }}" + +# - name: VAddy private net logs +# if: ${{ always() }} +# working-directory: /tmp/go-vaddy-master/privatenet +# run: cat vaddy/*.txt diff --git a/codeception/acceptance/EF03OrderCest.php b/codeception/acceptance/EF03OrderCest.php index 41e8d27b34f..b2952fd2943 100644 --- a/codeception/acceptance/EF03OrderCest.php +++ b/codeception/acceptance/EF03OrderCest.php @@ -345,7 +345,7 @@ public function order_ゲスト購入情報変更(AcceptanceTester $I) /** * @see https://github.com/EC-CUBE/ec-cube/pull/3133 - * @vaddy + * @group vaddy */ public function order_ログインしてカートをマージ(AcceptanceTester $I) { diff --git a/codeception/acceptance/EF05MypageCest.php b/codeception/acceptance/EF05MypageCest.php index 71732a22bf2..375e57d731b 100644 --- a/codeception/acceptance/EF05MypageCest.php +++ b/codeception/acceptance/EF05MypageCest.php @@ -252,7 +252,7 @@ public function mypage_お届け先編集作成変更(AcceptanceTester $I) /** * @group excludeCoverage - * @vaddy + * @group vaddy */ public function mypage_お届け先編集削除(AcceptanceTester $I) { diff --git a/package-lock.json b/package-lock.json index 62916b55ef7..918f0d5898e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "@babel/preset-env": "^7.18.2", "autoprefixer": "^9.6.4", "babel-loader": "^8.2.5", - "browser-sync": "^2.28.3", + "browser-sync": "^3.0.2", "cross-env": "^7.0.2", "css-mqpacker": "^7.0.0", "gulp": "^4.0.2", @@ -2853,15 +2853,6 @@ "url": "https://opencollective.com/postcss/" } }, - "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dev": true, - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, "node_modules/babel-loader": { "version": "8.2.5", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.5.tgz", @@ -3095,15 +3086,14 @@ } }, "node_modules/browser-sync": { - "version": "2.28.3", - "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.28.3.tgz", - "integrity": "sha512-gublDeevvAuypnc01SQNGL8fkm4RdIkEagnAJ8Tl9mvr2td3Pl4nVIg5S6fcgoMDEWb8IT7nUHG9YwTATn/k2g==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-3.0.2.tgz", + "integrity": "sha512-PC9c7aWJFVR4IFySrJxOqLwB9ENn3/TaXCXtAa0SzLwocLN3qMjN+IatbjvtCX92BjNXsY6YWg9Eb7F3Wy255g==", "dev": true, "dependencies": { - "browser-sync-client": "^2.28.3", - "browser-sync-ui": "^2.28.3", + "browser-sync-client": "^3.0.2", + "browser-sync-ui": "^3.0.2", "bs-recipes": "1.3.4", - "bs-snippet-injector": "^2.0.1", "chalk": "4.1.2", "chokidar": "^3.5.1", "connect": "3.6.6", @@ -3116,11 +3106,9 @@ "fs-extra": "3.0.1", "http-proxy": "^1.18.1", "immutable": "^3", - "localtunnel": "^2.0.1", "micromatch": "^4.0.2", "opn": "5.3.0", "portscanner": "2.2.0", - "qs": "^6.11.0", "raw-body": "^2.3.2", "resp-modifier": "6.0.2", "rx": "4.1.0", @@ -3140,25 +3128,23 @@ } }, "node_modules/browser-sync-client": { - "version": "2.28.3", - "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.28.3.tgz", - "integrity": "sha512-SMsnGkyXlySVLBWRrXdnTdtQCy0Sl5UoiF8BVtigj9S49DaPWQiesbsyq+uJBUKgpyNve+cvfpBU3KSfIp6oLQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-3.0.2.tgz", + "integrity": "sha512-tBWdfn9L0wd2Pjuz/NWHtNEKthVb1Y67vg8/qyGNtCqetNz5lkDkFnrsx5UhPNPYUO8vci50IWC/BhYaQskDiQ==", "dev": true, "dependencies": { "etag": "1.8.1", "fresh": "0.5.2", - "mitt": "^1.1.3", - "rxjs": "^5.5.6", - "typescript": "^4.6.2" + "mitt": "^1.1.3" }, "engines": { "node": ">=8.0.0" } }, "node_modules/browser-sync-ui": { - "version": "2.28.3", - "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.28.3.tgz", - "integrity": "sha512-Mj5M+O3jroGp5hlO6pDfUo19wzUTIuvGyzaRrJAYUgsSkpFacrX+MLCjN9VbZm9fYXbtHyIsnIUUIlYag87wgQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-3.0.2.tgz", + "integrity": "sha512-V3FwWAI+abVbFLTyJjXJlCMBwjc3GXf/BPGfwO2fMFACWbIGW9/4SrBOFYEOOtqzCjQE0Di+U3VIb7eES4omNA==", "dev": true, "dependencies": { "async-each-series": "0.1.1", @@ -3343,12 +3329,6 @@ "integrity": "sha512-BXvDkqhDNxXEjeGM8LFkSbR+jzmP/CYpCiVKYn+soB1dDldeU15EBNDkwVXndKuX35wnNUaPd0qSoQEAkmQtMw==", "dev": true }, - "node_modules/bs-snippet-injector": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/bs-snippet-injector/-/bs-snippet-injector-2.0.1.tgz", - "integrity": "sha512-4u8IgB+L9L+S5hknOj3ddNSb42436gsnGm1AuM15B7CdbkpQTyVWgIM5/JUBiKiRwGOR86uo0Lu/OsX+SAlJmw==", - "dev": true - }, "node_modules/buffer-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", @@ -3691,38 +3671,6 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", @@ -4491,14 +4439,14 @@ } }, "node_modules/engine.io-client": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.4.0.tgz", - "integrity": "sha512-GyKPDyoEha+XZ7iEqam49vz6auPnNJ9ZBfy89f+rMMas8AuiMWOZ9PVzu8xb9ZC6rafUqiGHSCfu22ih66E+1g==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.5.3.tgz", + "integrity": "sha512-9Z0qLB0NIisTRt1DZ/8U2k12RJn8yls/nXMZLn+/N8hANT3TcYjKFKcwbw5zFQiN4NTde3TSY9zb79e1ij6j9Q==", "dev": true, "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.1", - "engine.io-parser": "~5.0.3", + "engine.io-parser": "~5.2.1", "ws": "~8.11.0", "xmlhttprequest-ssl": "~2.0.0" } @@ -4520,6 +4468,15 @@ } } }, + "node_modules/engine.io-client/node_modules/engine.io-parser": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.1.tgz", + "integrity": "sha512-9JktcM3u18nU9N2Lz3bWeBgxVgOKpw7yhRaoxQA3FUDZzzw+9WlA6p4G4u0RixNkg14fH7EfEc/RhpurtiROTQ==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/engine.io-client/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -5482,9 +5439,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "dev": true, "funding": [ { @@ -7733,65 +7690,6 @@ "node": ">=8.9.0" } }, - "node_modules/localtunnel": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.2.tgz", - "integrity": "sha512-n418Cn5ynvJd7m/N1d9WVJISLJF/ellZnfsLnx8WBWGzxv/ntNcFkJ1o6se5quUhCplfLGBNL5tYHiq5WF3Nug==", - "dev": true, - "dependencies": { - "axios": "0.21.4", - "debug": "4.3.2", - "openurl": "1.1.1", - "yargs": "17.1.1" - }, - "bin": { - "lt": "bin/lt.js" - }, - "engines": { - "node": ">=8.3.0" - } - }, - "node_modules/localtunnel/node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/localtunnel/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/localtunnel/node_modules/yargs": { - "version": "17.1.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.1.1.tgz", - "integrity": "sha512-c2k48R0PwKIqKhPMWjeiF6y2xY/gPMUlro0sgxqXpbOIohWiLNXWslsootttv7E1e73QPAMQSg5FeySbVcpsPQ==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", @@ -8776,12 +8674,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/openurl": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/openurl/-/openurl-1.1.1.tgz", - "integrity": "sha512-d/gTkTb1i1GKz5k3XE3XFV/PxQ1k45zDqGP2OA7YhgsaLoqm6qRvARAZOFer1fcXritWlGBRCu/UgeS4HAnXAA==", - "dev": true - }, "node_modules/opn": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/opn/-/opn-5.3.0.tgz", @@ -9315,21 +9207,6 @@ "node": ">=6" } }, - "node_modules/qs": { - "version": "6.11.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.1.tgz", - "integrity": "sha512-0wsrzgTz/kAVIeuxSjnpGC56rzYtr6JT/2BwEvMaPhFIoYa1aGO8LbzuU1R0uUYQkLpWBTOj0l/CLAJB64J6nQ==", - "dev": true, - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -9781,18 +9658,6 @@ "integrity": "sha512-CiaiuN6gapkdl+cZUr67W6I8jquN4lkak3vtIsIWCl4XIPP8ffsoyN6/+PuGXnQy8Cu8W2y9Xxh31Rq4M6wUug==", "dev": true }, - "node_modules/rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", - "dev": true, - "dependencies": { - "symbol-observable": "1.0.1" - }, - "engines": { - "npm": ">=2.0.0" - } - }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -10148,20 +10013,6 @@ "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", "dev": true }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/signal-exit": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", @@ -10416,15 +10267,15 @@ } }, "node_modules/socket.io-client": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.6.1.tgz", - "integrity": "sha512-5UswCV6hpaRsNg5kkEHVcbBIXEYoVbMQaHJBXJCyEQ+CiFPV1NIOY0XOFWG4XR4GZcB8Kn6AsRs/9cy9TbqVMQ==", + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.7.4.tgz", + "integrity": "sha512-wh+OkeF0rAVCrABWQBaEjLfb7DVPotMbu0cgWgyR0v6eA4EoVnAwcIeIbcdTE3GT/H3kbdLl7OoH2+asoDRIIg==", "dev": true, "dependencies": { "@socket.io/component-emitter": "~3.1.0", "debug": "~4.3.2", - "engine.io-client": "~6.4.0", - "socket.io-parser": "~4.2.1" + "engine.io-client": "~6.5.2", + "socket.io-parser": "~4.2.4" }, "engines": { "node": ">=10.0.0" @@ -10902,15 +10753,6 @@ "es6-symbol": "^3.1.1" } }, - "node_modules/symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha512-Kb3PrPYz4HanVF1LVGuAdW6LoVgIwjUYJGzFe7NDrBLCN4lsV/5J0MFurV+ygS4bRVwrCEt2c7MQ1R2a72oJDw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -11174,19 +11016,6 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, "node_modules/ua-parser-js": { "version": "1.0.34", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.34.tgz", @@ -11735,18 +11564,6 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/webpack-cli/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/webpack-cli/node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -12022,15 +11839,6 @@ "node": ">=12" } }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/yargs/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", diff --git a/package.json b/package.json index 93271dd0c89..3a790833d56 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@babel/preset-env": "^7.18.2", "autoprefixer": "^9.6.4", "babel-loader": "^8.2.5", - "browser-sync": "^2.28.3", + "browser-sync": "^3.0.2", "cross-env": "^7.0.2", "css-mqpacker": "^7.0.0", "gulp": "^4.0.2", diff --git a/src/Eccube/EventListener/TwigInitializeListener.php b/src/Eccube/EventListener/TwigInitializeListener.php index 6d057b9aeb2..32309ed1c59 100644 --- a/src/Eccube/EventListener/TwigInitializeListener.php +++ b/src/Eccube/EventListener/TwigInitializeListener.php @@ -253,6 +253,7 @@ public function setAdminGlobals(RequestEvent $event) $eccubeNav = $this->getDisplayEccubeNav($eccubeNav, $AuthorityRoles, $baseUrl); } $this->twig->addGlobal('eccubeNav', $eccubeNav); + $this->twig->addGlobal('isMaintenance', $this->systemService->isMaintenanceMode()); } /** diff --git a/src/Eccube/Form/Type/Install/Step4Type.php b/src/Eccube/Form/Type/Install/Step4Type.php index 00a447c630d..e3831768291 100644 --- a/src/Eccube/Form/Type/Install/Step4Type.php +++ b/src/Eccube/Form/Type/Install/Step4Type.php @@ -91,6 +91,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ->add('database_password', PasswordType::class, [ 'label' => trans('install.database_password'), 'required' => false, + 'purify_html' => false, ]) ->addEventListener(FormEvents::POST_SUBMIT, function ($event) { $form = $event->getForm(); diff --git a/src/Eccube/Resource/locale/messages.en.yaml b/src/Eccube/Resource/locale/messages.en.yaml index b43ac56e698..6194eb2454a 100644 --- a/src/Eccube/Resource/locale/messages.en.yaml +++ b/src/Eccube/Resource/locale/messages.en.yaml @@ -503,6 +503,7 @@ admin.common.move_to_confirm_move_only: Move admin.common.move_to_confirm_save_and_move: Save & Move admin.common.admin_url_warning: 'Please set the Admin Console URL that is hard to guess for security. You can set it at "Security".' admin.common.restrict_file_upload_info: 'If this feature is used infrequently, disabling it while not in use provides additional security. You can disable this feature by setting the environment variable ECCUBE_RESTRICT_FILE_UPLOAD to 1.' +admin.common.notice_maintenance_mode: 'Currently in maintenance mode.' # Labels related to entity diff --git a/src/Eccube/Resource/locale/messages.ja.yaml b/src/Eccube/Resource/locale/messages.ja.yaml index ab805f6454d..9e59daf494a 100644 --- a/src/Eccube/Resource/locale/messages.ja.yaml +++ b/src/Eccube/Resource/locale/messages.ja.yaml @@ -503,6 +503,7 @@ admin.common.move_to_confirm_move_only: 保存せずに移動 admin.common.move_to_confirm_save_and_move: 保存して移動 admin.common.admin_url_warning: '管理画面URLは、セキュリティのため推測されにくいものを設定してください。「セキュリティ管理」から設定できます。' admin.common.restrict_file_upload_info: 'この機能の利用頻度が低い場合、使用しない間は無効化することでセキュリティを更に向上させることができます。環境変数 ECCUBE_RESTRICT_FILE_UPLOAD を 1 に設定することで機能を無効化することが可能です。' +admin.common.notice_maintenance_mode: '現在メンテナンスモード中です。' # エンティティに関連するラベル diff --git a/src/Eccube/Resource/template/admin/Content/news_edit.twig b/src/Eccube/Resource/template/admin/Content/news_edit.twig index 1a56ac7006b..abea34b4e71 100644 --- a/src/Eccube/Resource/template/admin/Content/news_edit.twig +++ b/src/Eccube/Resource/template/admin/Content/news_edit.twig @@ -37,7 +37,13 @@ file that was distributed with this source code.