From ee4adeb275671a024ce60729d3cc853f68e466f9 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Wed, 24 Jul 2019 17:57:20 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=E3=83=91=E3=82=B9=E3=83=AF=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=81=AE=E6=96=87=E5=AD=97=E5=88=97=E5=BC=B7=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 半角英数字をそれぞれ1種類以上含む8文字以上100文字以下の文字列ではない場合エラーとする --- data/class/SC_CheckError.php | 27 +++++++++++++++++++ data/class/SC_FormParam.php | 1 + data/class/helper/SC_Helper_Customer.php | 4 +-- .../system/LC_Page_Admin_System_Input.php | 4 +-- data/mtb_constants_init.php | 4 +-- html/install/sql/insert_data.sql | 4 +-- 6 files changed, 36 insertions(+), 8 deletions(-) diff --git a/data/class/SC_CheckError.php b/data/class/SC_CheckError.php index 40af90927c..15ca9d9a1b 100644 --- a/data/class/SC_CheckError.php +++ b/data/class/SC_CheckError.php @@ -862,6 +862,33 @@ public function GRAPH_CHECK($value) } } + /** + * パスワードに使用可能な文字列のチェック + * + * 半角英数字をそれぞれ1種類以上含む8文字以上100文字以下の文字列ではない場合エラーとする + * + * @param array $value $value[0] = 項目名 $value[1] = チェック対象のパスワード文字列 + */ + public function PASSWORD_CHAR_CHECK($value) + { + $disp_name = $value[0]; + $keyname = $value[1]; + + if (isset($this->arrErr[$keyname])) { + return; + } + + $this->createParam($value); + + $input_var = $this->arrParam[$keyname]; + // see https://qiita.com/mpyw/items/886218e7b418dfed254b + $pattern = '/\A(?=\d{0,99}+[a-z])(?=[a-z]{0,99}+\d)[a-z\d]{8,100}+\z/i'; + if (strlen($input_var) > 0 && !preg_match($pattern, $input_var)) { + $this->arrErr[$keyname] = + "※ {$disp_name}は英数字をそれぞれ1種類使用し、8文字以上で入力してください。
"; + } + } + /* 必須選択の判定 */ // 入力値で0が許されない場合エラーを返す // value[0] = 項目名 value[1] = 判定対象 diff --git a/data/class/SC_FormParam.php b/data/class/SC_FormParam.php index ecdd15c261..a4995b97fd 100644 --- a/data/class/SC_FormParam.php +++ b/data/class/SC_FormParam.php @@ -206,6 +206,7 @@ public function checkError($br = true) case 'NUM_CHECK': case 'EMAIL_CHECK': case 'EMAIL_CHAR_CHECK': + case 'PASSWORD_CHAR_CHECK': case 'ALNUM_CHECK': case 'GRAPH_CHECK': case 'KANA_CHECK': diff --git a/data/class/helper/SC_Helper_Customer.php b/data/class/helper/SC_Helper_Customer.php index bad44b11c3..cf3dd8c33e 100644 --- a/data/class/helper/SC_Helper_Customer.php +++ b/data/class/helper/SC_Helper_Customer.php @@ -430,7 +430,7 @@ public function sfCustomerCommonParam(&$objFormParam, $prefix = '') */ public function sfCustomerRegisterParam(&$objFormParam, $isAdmin = false, $is_mypage = false, $prefix = '') { - $objFormParam->addParam('パスワード', $prefix . 'password', PASSWORD_MAX_LEN, '', array('EXIST_CHECK', 'SPTAB_CHECK', 'GRAPH_CHECK')); + $objFormParam->addParam('パスワード', $prefix . 'password', PASSWORD_MAX_LEN, '', array('EXIST_CHECK', 'SPTAB_CHECK', 'PASSWORD_CHAR_CHECK')); $objFormParam->addParam('パスワード確認用の質問の答え', $prefix . 'reminder_answer', STEXT_LEN, '', array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK')); $objFormParam->addParam('パスワード確認用の質問', $prefix . 'reminder', STEXT_LEN, 'n', array('EXIST_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK')); $objFormParam->addParam('性別', $prefix . 'sex', INT_LEN, 'n', array('EXIST_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK')); @@ -443,7 +443,7 @@ public function sfCustomerRegisterParam(&$objFormParam, $isAdmin = false, $is_my if (SC_Display_Ex::detectDevice() !== DEVICE_TYPE_MOBILE) { $objFormParam->addParam('メールアドレス', $prefix . 'email', null, 'a', array('NO_SPTAB', 'EXIST_CHECK', 'EMAIL_CHECK', 'SPTAB_CHECK', 'EMAIL_CHAR_CHECK')); - $objFormParam->addParam('パスワード(確認)', $prefix . 'password02', PASSWORD_MAX_LEN, '', array('EXIST_CHECK', 'SPTAB_CHECK', 'GRAPH_CHECK'), '', false); + $objFormParam->addParam('パスワード(確認)', $prefix . 'password02', PASSWORD_MAX_LEN, '', array('EXIST_CHECK', 'SPTAB_CHECK', 'PASSWORD_CHAR_CHECK'), '', false); if (!$isAdmin) { $objFormParam->addParam('メールアドレス(確認)', $prefix . 'email02', null, 'a', array('NO_SPTAB', 'EXIST_CHECK', 'EMAIL_CHECK', 'SPTAB_CHECK', 'EMAIL_CHAR_CHECK'), '', false); } diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_Input.php b/data/class/pages/admin/system/LC_Page_Admin_System_Input.php index b5fbdbb5c7..3e014e9057 100644 --- a/data/class/pages/admin/system/LC_Page_Admin_System_Input.php +++ b/data/class/pages/admin/system/LC_Page_Admin_System_Input.php @@ -189,8 +189,8 @@ public function initForm(&$objFormParam, &$arrParams, $mode = '') $objFormParam->addParam('パスワード', 'password', '', '', array('EXIST_CHECK')); $objFormParam->addParam('パスワード(確認)', 'password02', '', '', array('EXIST_CHECK')); } else { - $objFormParam->addParam('パスワード', 'password', '', '', array('EXIST_CHECK', 'GRAPH_CHECK')); - $objFormParam->addParam('パスワード(確認)', 'password02', '', '', array('EXIST_CHECK', 'GRAPH_CHECK')); + $objFormParam->addParam('パスワード', 'password', '', '', array('EXIST_CHECK', 'PASSWORD_CHAR_CHECK')); + $objFormParam->addParam('パスワード(確認)', 'password02', '', '', array('EXIST_CHECK', 'PASSWORD_CHAR_CHECK')); } $objFormParam->addParam('権限', 'authority', INT_LEN, '', array('EXIST_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK')); $objFormParam->addParam('稼働/非稼働', 'work', INT_LEN, '', array('EXIST_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK')); diff --git a/data/mtb_constants_init.php b/data/mtb_constants_init.php index e0179a7b78..13066f1387 100644 --- a/data/mtb_constants_init.php +++ b/data/mtb_constants_init.php @@ -255,9 +255,9 @@ /** 電話番号総数 */ define('TEL_LEN', 12); /** フロント画面用:パスワードの最小文字数 */ -define('PASSWORD_MIN_LEN', 4); +define('PASSWORD_MIN_LEN', 8); /** フロント画面用:パスワードの最大文字数 */ -define('PASSWORD_MAX_LEN', STEXT_LEN); +define('PASSWORD_MAX_LEN', SMTEXT_LEN); /** 検査数値用桁数(INT) */ define('INT_LEN', 9); /** クレジットカードの文字数 (*モジュールで使用) */ diff --git a/html/install/sql/insert_data.sql b/html/install/sql/insert_data.sql index 69f207e197..9887f1506c 100644 --- a/html/install/sql/insert_data.sql +++ b/html/install/sql/insert_data.sql @@ -1170,8 +1170,8 @@ INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('ZIP01_LEN', '3', 20 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('ZIP02_LEN', '4', 201, '郵便番号2'); INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('TEL_ITEM_LEN', '6', 202, '電話番号各項目制限'); INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('TEL_LEN', '12', 203, '電話番号総数'); -INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PASSWORD_MIN_LEN', '4', 204, 'フロント画面用:パスワードの最小文字数'); -INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PASSWORD_MAX_LEN', 'STEXT_LEN', 205, 'フロント画面用:パスワードの最大文字数'); +INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PASSWORD_MIN_LEN', '8', 204, 'フロント画面用:パスワードの最小文字数'); +INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PASSWORD_MAX_LEN', 'SMTEXT_LEN', 205, 'フロント画面用:パスワードの最大文字数'); INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('INT_LEN', '9', 206, '検査数値用桁数(INT)'); INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('CREDIT_NO_LEN', '4', 207, 'クレジットカードの文字数 (*モジュールで使用)'); INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('SEARCH_CATEGORY_LEN', '18', 208, '検索カテゴリ最大表示文字数(byte)'); From 3664f89b8cb1d69820433bb156368a4682e2c7a1 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Tue, 2 Jul 2019 22:06:47 +0900 Subject: [PATCH 2/6] Fix Cannot declare class Autoloading_SC_Product --- tests/class/plugin/LoadClassFileChangeTest.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/class/plugin/LoadClassFileChangeTest.php b/tests/class/plugin/LoadClassFileChangeTest.php index 803d81bcbd..db88a77791 100644 --- a/tests/class/plugin/LoadClassFileChangeTest.php +++ b/tests/class/plugin/LoadClassFileChangeTest.php @@ -9,10 +9,6 @@ protected function setUp() { parent::setUp(); $this->createPlugin(); - if (PHP_VERSION_ID < 70200) { - $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); - $objPlugin->load(); - } } protected function tearDown() From ccb09808999bfd57bf79a55a74f876c71b0a1dfd Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Thu, 25 Jul 2019 13:20:41 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=E3=83=91=E3=82=B9=E3=83=AF=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=81=AB=E8=A8=98=E5=8F=B7=E3=82=82=E5=90=AB=E3=82=81?= =?UTF-8?q?=E3=82=89=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - インストーラのログインID, パスワード設定に記号を含められないのを修正 - 管理画面ユーザーのパスワード桁数を PASSWORD_MIN_LEN, PASSWORD_MAX_LEN に変更 - PASSWORD_MIN_LEN が8未満の場合は E_USER_WARNING を出力するよう修正 --- data/Smarty/templates/admin/system/input.tpl | 2 +- data/class/SC_CheckError.php | 10 +++++++--- data/class/pages/admin/LC_Page_Admin_Index.php | 2 +- .../pages/admin/system/LC_Page_Admin_System_Input.php | 4 ++-- html/install/index.php | 6 +++--- html/install/templates/step1.tpl | 4 ++-- 6 files changed, 16 insertions(+), 12 deletions(-) diff --git a/data/Smarty/templates/admin/system/input.tpl b/data/Smarty/templates/admin/system/input.tpl index 9df9e67fe9..e454dfa6ea 100644 --- a/data/Smarty/templates/admin/system/input.tpl +++ b/data/Smarty/templates/admin/system/input.tpl @@ -71,7 +71,7 @@ self.moveTo(20,20);self.focus(); ※必須入力
- ※半角英数字文字(記号可) + ※半角英数字文字(記号可)

確認のために2度入力してください。

diff --git a/data/class/SC_CheckError.php b/data/class/SC_CheckError.php index 15ca9d9a1b..40fb6d3e1a 100644 --- a/data/class/SC_CheckError.php +++ b/data/class/SC_CheckError.php @@ -865,12 +865,16 @@ public function GRAPH_CHECK($value) /** * パスワードに使用可能な文字列のチェック * - * 半角英数字をそれぞれ1種類以上含む8文字以上100文字以下の文字列ではない場合エラーとする + * 半角英数字をそれぞれ1種類以上含む PASSWORD_MIN_LEN 文字以上 PASSWORD_MAX_LEN 文字以下の文字列ではない場合エラーとする + * PASSWORD_MIN_LEN が8未満の場合は E_USER_WARNING を出力する * * @param array $value $value[0] = 項目名 $value[1] = チェック対象のパスワード文字列 */ public function PASSWORD_CHAR_CHECK($value) { + if (PASSWORD_MIN_LEN < 8) { + trigger_error('PASSWORD_MIN_LEN が8未満に設定されています。', E_USER_WARNING); + } $disp_name = $value[0]; $keyname = $value[1]; @@ -882,10 +886,10 @@ public function PASSWORD_CHAR_CHECK($value) $input_var = $this->arrParam[$keyname]; // see https://qiita.com/mpyw/items/886218e7b418dfed254b - $pattern = '/\A(?=\d{0,99}+[a-z])(?=[a-z]{0,99}+\d)[a-z\d]{8,100}+\z/i'; + $pattern = '/\A(?=.*?[a-z])(?=.*?\d)[!-~]{'.PASSWORD_MIN_LEN.','.PASSWORD_MAX_LEN.'}+\z/i'; if (strlen($input_var) > 0 && !preg_match($pattern, $input_var)) { $this->arrErr[$keyname] = - "※ {$disp_name}は英数字をそれぞれ1種類使用し、8文字以上で入力してください。
"; + "※ {$disp_name}は英数字をそれぞれ1種類使用し、".PASSWORD_MIN_LEN."文字以上で入力してください。
"; } } diff --git a/data/class/pages/admin/LC_Page_Admin_Index.php b/data/class/pages/admin/LC_Page_Admin_Index.php index f3d8dc9aeb..929c4d4c39 100644 --- a/data/class/pages/admin/LC_Page_Admin_Index.php +++ b/data/class/pages/admin/LC_Page_Admin_Index.php @@ -100,7 +100,7 @@ public function action() public function lfInitParam(&$objFormParam) { $objFormParam->addParam('ID', 'login_id', ID_MAX_LEN, '', array('EXIST_CHECK', 'ALNUM_CHECK' ,'MAX_LENGTH_CHECK')); - $objFormParam->addParam('PASSWORD', 'password', ID_MAX_LEN, '', array('EXIST_CHECK', 'GRAPH_CHECK', 'MAX_LENGTH_CHECK')); + $objFormParam->addParam('PASSWORD', 'password', PASSWORD_MAX_LEN, '', array('EXIST_CHECK', 'GRAPH_CHECK', 'MAX_LENGTH_CHECK')); } /** diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_Input.php b/data/class/pages/admin/system/LC_Page_Admin_System_Input.php index 3e014e9057..f6be3eb890 100644 --- a/data/class/pages/admin/system/LC_Page_Admin_System_Input.php +++ b/data/class/pages/admin/system/LC_Page_Admin_System_Input.php @@ -216,10 +216,10 @@ public function validateData(&$objFormParam, &$arrParams, $mode) // ログインID・パスワードの文字数チェック $objErr = new SC_CheckError_Ex(); if ($mode == 'new') { - $objErr->doFunc(array('パスワード', 'password', ID_MIN_LEN, ID_MAX_LEN), array('NUM_RANGE_CHECK')); + $objErr->doFunc(array('パスワード', 'password', PASSWORD_MIN_LEN, PASSWORD_MAX_LEN), array('NUM_RANGE_CHECK')); $objErr->doFunc(array('ログインID', 'login_id', ID_MIN_LEN, ID_MAX_LEN), array('NUM_RANGE_CHECK')); } elseif ($mode == 'edit') { - $objErr->doFunc(array('パスワード', 'password', ID_MIN_LEN, ID_MAX_LEN), array('SPTAB_CHECK', 'NUM_RANGE_CHECK')); + $objErr->doFunc(array('パスワード', 'password', PASSWORD_MIN_LEN, PASSWORD_MAX_LEN), array('SPTAB_CHECK', 'NUM_RANGE_CHECK')); $objErr->doFunc(array('ログインID', 'login_id', ID_MIN_LEN, ID_MAX_LEN), array('SPTAB_CHECK', 'NUM_RANGE_CHECK')); } $objErr->doFunc(array('パスワード', 'パスワード(確認)', 'password', 'password02'), array('EQUAL_CHECK')); diff --git a/html/install/index.php b/html/install/index.php index c6614c1970..dddceab457 100644 --- a/html/install/index.php +++ b/html/install/index.php @@ -701,8 +701,8 @@ function lfInitWebParam($objWebParam) $objWebParam->addParam('店名', 'shop_name', MTEXT_LEN, '', array('EXIST_CHECK', 'MAX_LENGTH_CHECK'), $shop_name); $objWebParam->addParam('管理者:メールアドレス', 'admin_mail', null, '', array('EXIST_CHECK', 'EMAIL_CHECK', 'EMAIL_CHAR_CHECK'), $admin_mail); - $objWebParam->addParam('管理者:ログインID', 'login_id', ID_MAX_LEN, '', array('EXIST_CHECK', 'SPTAB_CHECK', 'ALNUM_CHECK')); - $objWebParam->addParam('管理者:パスワード', 'login_pass', ID_MAX_LEN, '', array('EXIST_CHECK', 'SPTAB_CHECK', 'ALNUM_CHECK')); + $objWebParam->addParam('管理者:ログインID', 'login_id', ID_MAX_LEN, '', array('EXIST_CHECK', 'SPTAB_CHECK', 'GRAPH_CHECK')); + $objWebParam->addParam('管理者:パスワード', 'login_pass', PASSWORD_MAX_LEN, '', array('EXIST_CHECK', 'SPTAB_CHECK', 'PASSWORD_CHAR_CHECK')); $objWebParam->addParam('管理機能:ディレクトリ', 'admin_dir', ID_MAX_LEN, 'a', array('EXIST_CHECK', 'SPTAB_CHECK', 'ALNUM_CHECK'), $oldAdminDir); $objWebParam->addParam('管理機能:SSL制限', 'admin_force_ssl', 1, 'n', array('SPTAB_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK'), $admin_force_ssl); $objWebParam->addParam('管理機能:IP制限', 'admin_allow_hosts', LTEXT_LEN, 'an', array('IP_CHECK', 'MAX_LENGTH_CHECK'), $admin_allow_hosts); @@ -782,7 +782,7 @@ function lfCheckWebError($objWebParam) $objErr->doFunc(array('管理者:ログインID', 'login_id', ID_MIN_LEN, ID_MAX_LEN), array('SPTAB_CHECK', 'NUM_RANGE_CHECK')); // パスワードのチェック - $objErr->doFunc(array('管理者:パスワード', 'login_pass', ID_MIN_LEN, ID_MAX_LEN), array('SPTAB_CHECK', 'NUM_RANGE_CHECK')); + $objErr->doFunc(array('管理者:パスワード', 'login_pass', PASSWORD_MIN_LEN, PASSWORD_MAX_LEN), array('SPTAB_CHECK', 'NUM_RANGE_CHECK')); // 管理機能ディレクトリのチェック $objErr->doFunc(array('管理機能:ディレクトリ', 'admin_dir', ID_MIN_LEN, ID_MAX_LEN), array('SPTAB_CHECK', 'NUM_RANGE_CHECK')); diff --git a/html/install/templates/step1.tpl b/html/install/templates/step1.tpl index 190e10423c..3eac840123 100644 --- a/html/install/templates/step1.tpl +++ b/html/install/templates/step1.tpl @@ -75,7 +75,7 @@ $(function() { - ログインID
半角英数字文字 + ログインID
半角英数字記号文字 @@ -84,7 +84,7 @@ $(function() { - パスワード
半角英数字文字 + パスワード
半角英数字記号文字 From ee227867393e30ad9bbff996d8776d0778c27adf Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Thu, 25 Jul 2019 13:36:00 +0900 Subject: [PATCH 4/6] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=82=B1?= =?UTF-8?q?=E3=83=BC=E3=82=B9=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SC_CheckError_PASSWORD_CHAR_CHECKTest.php | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 tests/class/SC_CheckError/SC_CheckError_PASSWORD_CHAR_CHECKTest.php diff --git a/tests/class/SC_CheckError/SC_CheckError_PASSWORD_CHAR_CHECKTest.php b/tests/class/SC_CheckError/SC_CheckError_PASSWORD_CHAR_CHECKTest.php new file mode 100644 index 0000000000..b8515aadb6 --- /dev/null +++ b/tests/class/SC_CheckError/SC_CheckError_PASSWORD_CHAR_CHECKTest.php @@ -0,0 +1,94 @@ +target_func = 'PASSWORD_CHAR_CHECK'; + $this->faker = Faker\Factory::create('ja_JP'); + } + + public function testPASSWORD_CHAR_CHECK() + { + $this->arrForm = [self::FORM_NAME => 'aaaa1111']; + $this->expected = ''; + + $this->scenario(); + $this->verify(); + } + + public function testPASSWORD_CHAR_CHECKWithSymbol() + { + $this->arrForm = [self::FORM_NAME => 'aaaa.1111']; + $this->expected = ''; + + $this->scenario(); + $this->verify(); + } + + public function testPASSWORD_CHAR_CHECKWithEmpty() + { + $this->arrForm = [self::FORM_NAME => '']; + $this->expected = ''; + + $this->scenario(); + $this->verify(); + } + + public function testPASSWORD_CHAR_CHECKWithNull() + { + $this->arrForm = [self::FORM_NAME => null]; + $this->expected = ''; + + $this->scenario(); + $this->verify(); + } + + public function testPASSWORD_CHAR_CHECKWithFaker() + { + $this->arrForm = [ + self::FORM_NAME => $this->faker->password(8, 100) + ]; + $this->expected = ''; + $this->scenario(); + $this->verify($this->arrForm[self::FORM_NAME].' はパスワードに使用できない文字列です'); + } + + public function testPASSWORD_CHAR_CHECKWithAlphabetOnly() + { + $this->arrForm = [ + self::FORM_NAME => 'password' + ]; + $this->expected = '※ PASSWORD_CHAR_CHECKは英数字をそれぞれ1種類使用し、8文字以上で入力してください。
'; + + $this->scenario(); + $this->verify(); + } + + public function testPASSWORD_CHAR_CHECKWithNumberOnly() + { + $this->arrForm = [ + self::FORM_NAME => '12345678' + ]; + $this->expected = '※ PASSWORD_CHAR_CHECKは英数字をそれぞれ1種類使用し、8文字以上で入力してください。
'; + + $this->scenario(); + $this->verify(); + } + + public function testPASSWORD_CHAR_CHECKWithMinute() + { + $this->arrForm = [ + self::FORM_NAME => $this->faker->password(6, 7) + ]; + $this->expected = '※ PASSWORD_CHAR_CHECKは英数字をそれぞれ1種類使用し、8文字以上で入力してください。
'; + + $this->scenario(); + $this->verify(); + } +} + From 0a8ea853e941aa058fce12920e109ded0d91f8ff Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Thu, 25 Jul 2019 13:43:49 +0900 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BC=9A=E5=93=A1=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=81=AE=E3=83=91=E3=82=B9=E3=83=AF?= =?UTF-8?q?=E3=83=BC=E3=83=89=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ctests/acceptance/EntryCept.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ctests/acceptance/EntryCept.php b/ctests/acceptance/EntryCept.php index 880727212a..065bb6ed9d 100644 --- a/ctests/acceptance/EntryCept.php +++ b/ctests/acceptance/EntryCept.php @@ -5,6 +5,7 @@ $I->resetEmails(); $new_email = microtime(true).'.'.$faker->safeEmail; +$password = $faker->password(8, 100); $I->wantTo('会員登録が正常にできるかを確認する'); $I->amOnPage('/entry/kiyaku.php'); @@ -29,8 +30,8 @@ 'tel03' => '111', 'email' => $new_email, 'email02' => $new_email, - 'password' => 'password', - 'password02' => 'password', + 'password' => $password, + 'password02' => $password, 'sex' => (string) $faker->numberBetween(1, 2), 'reminder' => (string) $faker->numberBetween(1, 7), 'reminder_answer' => $faker->word, From 460721490947f1902c87c100c0ca319a5e1413e6 Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Thu, 25 Jul 2019 14:26:14 +0900 Subject: [PATCH 6/6] =?UTF-8?q?=E3=83=91=E3=82=B9=E3=83=AF=E3=83=BC?= =?UTF-8?q?=E3=83=89=E3=81=AB=E6=95=B0=E5=AD=97=E3=81=8C=E5=90=AB=E3=81=BE?= =?UTF-8?q?=E3=82=8C=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88=E3=81=8C=E3=81=82?= =?UTF-8?q?=E3=82=8B=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ctests/acceptance/EntryCept.php | 2 +- .../SC_CheckError/SC_CheckError_PASSWORD_CHAR_CHECKTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ctests/acceptance/EntryCept.php b/ctests/acceptance/EntryCept.php index 065bb6ed9d..a6fc561bd9 100644 --- a/ctests/acceptance/EntryCept.php +++ b/ctests/acceptance/EntryCept.php @@ -5,7 +5,7 @@ $I->resetEmails(); $new_email = microtime(true).'.'.$faker->safeEmail; -$password = $faker->password(8, 100); +$password = $faker->password(8, 100).'1'; $I->wantTo('会員登録が正常にできるかを確認する'); $I->amOnPage('/entry/kiyaku.php'); diff --git a/tests/class/SC_CheckError/SC_CheckError_PASSWORD_CHAR_CHECKTest.php b/tests/class/SC_CheckError/SC_CheckError_PASSWORD_CHAR_CHECKTest.php index b8515aadb6..95eb474ed1 100644 --- a/tests/class/SC_CheckError/SC_CheckError_PASSWORD_CHAR_CHECKTest.php +++ b/tests/class/SC_CheckError/SC_CheckError_PASSWORD_CHAR_CHECKTest.php @@ -51,7 +51,7 @@ public function testPASSWORD_CHAR_CHECKWithNull() public function testPASSWORD_CHAR_CHECKWithFaker() { $this->arrForm = [ - self::FORM_NAME => $this->faker->password(8, 100) + self::FORM_NAME => $this->faker->password(8, 100).'1' ]; $this->expected = ''; $this->scenario();