From e26cba49be980e8bbf047802c448ce65bbfe2037 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 15 Mar 2018 00:15:40 -0700 Subject: [PATCH 01/13] Update composer license --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 81a90ac..0ffe3f0 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "homepage": "https://github.com/VSEphpbb/passwordstrength", "version": "1.2.2", "keywords": ["phpbb", "extension", "password", "strength", "zxcvbn"], - "license": "GPL-2.0", + "license": "GPL-2.0-only", "authors": [ { "name": "Matt Friedman (VSE)", From bfcbc7db244cc7d1c6752b9af1a539dc2b1c3b2f Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 2 May 2018 18:26:40 -0700 Subject: [PATCH 02/13] Update info [ci skip] --- README.md | 2 +- composer.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 994b5c8..60d4b41 100644 --- a/README.md +++ b/README.md @@ -42,4 +42,4 @@ Password Strength is intended to encourage your forum users to use strong passwo ## License [GNU General Public License v2](http://opensource.org/licenses/GPL-2.0) -© 2013 - Matt Friedman (VSE) +© 2013 - Matt Friedman diff --git a/composer.json b/composer.json index 0ffe3f0..c880f3b 100644 --- a/composer.json +++ b/composer.json @@ -8,8 +8,8 @@ "license": "GPL-2.0-only", "authors": [ { - "name": "Matt Friedman (VSE)", - "homepage": "http://mattfriedman.me", + "name": "Matt Friedman", + "homepage": "http://vsephpbb.github.io", "role": "Developer" } ], From c0072481d8daf69cc31f28c9e5df50f51cd0731f Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Tue, 11 Sep 2018 17:57:02 -0700 Subject: [PATCH 03/13] Add Hebrew translation --- language/he/acp_passwordstrength.php | 41 +++++++++++++++++++++++++++ language/he/passwordstrength.php | 42 ++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 language/he/acp_passwordstrength.php create mode 100644 language/he/passwordstrength.php diff --git a/language/he/acp_passwordstrength.php b/language/he/acp_passwordstrength.php new file mode 100644 index 0000000..51aae77 --- /dev/null +++ b/language/he/acp_passwordstrength.php @@ -0,0 +1,41 @@ + 'אלגוריתם חוזק הסיסמה', + 'PASSWORD_STRENGTH_TYPE_EXPLAIN' => 'בחר אלגוריתם לקביעת חוזק סיסמה.
מורכבות מחפש תווים מעורבים מספרים וסמלים אורך סיסמה ומעודדת סיסמאות מורכבות.
אלגוריתם zxcvbn (מאת DropBox) מחשב כמה קלה הסיסמה שניתנת לניחוש, ומאפשר בכך סיסמאות חזקות וידידותיות למשתמש.', + 'PASSWORD_STRENGTH_TYPE_COMPLEX' => 'מורכבות', + 'PASSWORD_STRENGTH_TYPE_ZXCVBN' => 'אלגוריתם zxcvbn', +)); diff --git a/language/he/passwordstrength.php b/language/he/passwordstrength.php new file mode 100644 index 0000000..5d41f4c --- /dev/null +++ b/language/he/passwordstrength.php @@ -0,0 +1,42 @@ + 'סיסמה חלשה מאד', + 'PS_WEAK' => 'סיסמה חלשה', + 'PS_GOOD' => 'סיסמה טובה', + 'PS_STRONG' => 'סיסמה חזקה', + 'PS_VERY_STRONG' => 'סיסמה חזקה מאד', +)); From b51cfbf2f7e1276d34fcb37835b3ac0fcd39c543 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 2 Jan 2019 20:45:33 -0800 Subject: [PATCH 04/13] Update Travis to Trusty --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e6cbf28..53fffe8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: php sudo: required -dist: precise matrix: include: From 9d1ad7a6e869d111aabd5016a65db83a4d0991fc Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 9 Jan 2019 21:44:48 -0800 Subject: [PATCH 05/13] Fix tests up [ci skip] --- tests/functional/visibility_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/visibility_test.php b/tests/functional/visibility_test.php index 5ab9e76..d1047fc 100644 --- a/tests/functional/visibility_test.php +++ b/tests/functional/visibility_test.php @@ -15,7 +15,7 @@ */ class visibility_test extends \phpbb_functional_test_case { - static protected function setup_extensions() + protected static function setup_extensions() { return array('vse/passwordstrength'); } From 81b7bb642218526bcf80b52638593f5dd25a7c8e Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Fri, 1 Mar 2019 10:08:26 -0800 Subject: [PATCH 06/13] Update composer [ci skip] --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c880f3b..6dc1a4c 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "phpbb-extension", "description": "An extension for phpBB that will show users how strong (or weak) their password is as they type it into the password field when creating or updating their account.", "homepage": "https://github.com/VSEphpbb/passwordstrength", - "version": "1.2.2", + "version": "1.2.3-dev", "keywords": ["phpbb", "extension", "password", "strength", "zxcvbn"], "license": "GPL-2.0-only", "authors": [ From 96325d312c3f8203decf104f734ac343f1142974 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Tue, 21 May 2019 08:52:05 -0700 Subject: [PATCH 07/13] Remove sudo --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 53fffe8..d9e0eda 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,4 @@ language: php -sudo: required matrix: include: From b1e4bca55a0b7c0752a224876f570be40fab7f53 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Fri, 24 May 2019 18:51:15 -0700 Subject: [PATCH 08/13] use trusty build [ci skip] --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d9e0eda..e548d5c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: php +dist: trusty matrix: include: From 5a4821a42c595f8bf566b1de5206468617f01913 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Fri, 25 Oct 2019 00:19:35 -0700 Subject: [PATCH 09/13] Use build_select ACP function --- event/listener.php | 28 +++------------------------- tests/event/listener_test.php | 26 -------------------------- 2 files changed, 3 insertions(+), 51 deletions(-) diff --git a/event/listener.php b/event/listener.php index 76fc72c..c31fda5 100644 --- a/event/listener.php +++ b/event/listener.php @@ -88,8 +88,9 @@ public function password_strength_acp_options($event) 'lang' => 'PASSWORD_STRENGTH_TYPE', 'validate' => 'int', 'type' => 'select', - 'function' => array($this, 'select_password_strength'), - 'explain' => true + 'function' => 'build_select', + 'params' => array(array(0 => 'PASSWORD_STRENGTH_TYPE_COMPLEX', 1 => 'PASSWORD_STRENGTH_TYPE_ZXCVBN'), '{CONFIG_VALUE}'), + 'explain' => true, ), ); @@ -98,27 +99,4 @@ public function password_strength_acp_options($event) $event['display_vars'] = $display_vars; } } - - /** - * Select Password Strength type - * - * @param string $selected_value - * @param string $key - * @return string - */ - public function select_password_strength($selected_value, $key = '') - { - $pws_type_ary = array( - 0 => 'PASSWORD_STRENGTH_TYPE_COMPLEX', - 1 => 'PASSWORD_STRENGTH_TYPE_ZXCVBN' - ); - $pass_char_options = ''; - foreach ($pws_type_ary as $pws_id => $pws_type) - { - $selected = ($selected_value == $pws_id) ? ' selected="selected"' : ''; - $pass_char_options .= ''; - } - - return $pass_char_options; - } } diff --git a/tests/event/listener_test.php b/tests/event/listener_test.php index cda8e7d..9db04e5 100644 --- a/tests/event/listener_test.php +++ b/tests/event/listener_test.php @@ -164,30 +164,4 @@ public function test_password_strength_acp_options($mode, $display_vars, $expect $this->assertEquals($expected_keys, $keys); } - - public function select_password_strength_test_data() - { - return array( - array('', ''), - array('0', ''), - array('1', ''), - array('10', ''), - ); - } - - /** - * @dataProvider select_password_strength_test_data - */ - public function test_select_password_strength($selected, $expected) - { - $this->user->expects($this->any()) - ->method('lang') - ->will($this->returnArgument(0)); - - $this->set_listener(); - - $html = $this->listener->select_password_strength($selected); - - $this->assertEquals($expected, $html); - } } From 34bf97c0c820847b8c3c270cd95e8171fb7ac4ba Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 30 Oct 2019 12:11:05 -0700 Subject: [PATCH 10/13] Javascript updates --- styles/all/template/password_strength.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/styles/all/template/password_strength.html b/styles/all/template/password_strength.html index a2aaa3c..c583c86 100644 --- a/styles/all/template/password_strength.html +++ b/styles/all/template/password_strength.html @@ -26,7 +26,7 @@ {%- endif -%} showStrength($passField, score); } - $passField.bind('keyup blur', trigger).after($resultMsg); + $passField.on('keyup blur', trigger).after($resultMsg); }); }; {% if S_USE_ZXCVBN %} From a4097fad37d983423d5104adbc350171d04137fe Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 31 Oct 2019 22:36:40 -0700 Subject: [PATCH 11/13] Travis clean up --- .travis.yml | 2 +- travis/prepare-phpbb.sh | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index e548d5c..bce7498 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,7 @@ branches: - /^\d+(\.\d+)?\.x$/ install: - - travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH + - travis/prepare-phpbb.sh $PHPBB_BRANCH - cd ../../phpBB3 - travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH - travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION $NOTESTS diff --git a/travis/prepare-phpbb.sh b/travis/prepare-phpbb.sh index 01770ad..a2cc81c 100755 --- a/travis/prepare-phpbb.sh +++ b/travis/prepare-phpbb.sh @@ -11,9 +11,7 @@ set -e set -x -EXTNAME=$1 -BRANCH=$2 -EXTPATH_TEMP=$3 +BRANCH=$1 # Copy extension to a temp folder mkdir ../../tmp @@ -21,4 +19,4 @@ cp -R . ../../tmp cd ../../ # Clone phpBB -git clone --depth=1 "git://github.com/phpbb/phpbb.git" "phpBB3" --branch=$BRANCH +git clone --depth=1 "git://github.com/phpbb/phpbb.git" "phpBB3" --branch="$BRANCH" From 4b6409464d588240651a705f6a306337b2f25528 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Thu, 31 Oct 2019 22:36:51 -0700 Subject: [PATCH 12/13] phpBB 3.3 environment update --- .travis.yml | 34 ++++++++++++++-------------- phpunit.xml.dist | 6 +---- tests/functional/visibility_test.php | 2 +- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index bce7498..8d9071f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,30 +1,24 @@ language: php -dist: trusty +dist: xenial matrix: include: - - php: 5.5 + - php: 7.1 env: DB=none;NOTESTS=1 - - php: 5.4 - env: DB=mysqli #myisam - - php: 5.4 - env: DB=mysql - - php: 5.4 + - php: 7.1 env: DB=mariadb - - php: 5.4 + - php: 7.1 env: DB=postgres - - php: 5.4 + - php: 7.1 env: DB=sqlite3 - - php: 5.5 - env: DB=mysqli - - php: 5.6 - env: DB=mysqli - - php: 7.0 - env: DB=mysqli - php: 7.1 - env: DB=mysqli + env: DB=mysqli # MyISAM - php: 7.2 env: DB=mysqli + - php: 7.3 + env: DB=mysqli + - php: 7.4snapshot + env: DB=mysqli - php: nightly env: DB=mysqli allow_failures: @@ -38,13 +32,19 @@ env: - SNIFF="1" # Should we run code sniffer on your code? - IMAGE_ICC="1" # Should we run icc profile sniffer on your images? - EPV="1" # Should we run EPV (Extension Pre Validator) on your code? - - PHPBB_BRANCH="3.2.x" + - PHPBB_BRANCH="3.3.x" branches: only: - master + - develop + - /^develop-.*$/ - /^\d+(\.\d+)?\.x$/ +services: + - postgresql + - mysql + install: - travis/prepare-phpbb.sh $PHPBB_BRANCH - cd ../../phpBB3 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 289449d..574c6b9 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -8,7 +8,6 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - syntaxCheck="false" verbose="true" bootstrap="../../../../tests/bootstrap.php" > @@ -18,14 +17,11 @@ ./tests/functional - ./tests/functional/ + ./tests/functional/ - - ./tests/ - ./ diff --git a/tests/functional/visibility_test.php b/tests/functional/visibility_test.php index d1047fc..1314fd5 100644 --- a/tests/functional/visibility_test.php +++ b/tests/functional/visibility_test.php @@ -20,7 +20,7 @@ protected static function setup_extensions() return array('vse/passwordstrength'); } - public function setUp() + public function setUp(): void { parent::setUp(); $this->add_lang_ext('vse/passwordstrength', array('passwordstrength', 'acp_passwordstrength')); From 3b8b8ade7f456222d449562a9de070a4d33eee2a Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Sat, 11 Jan 2020 08:57:38 -0800 Subject: [PATCH 13/13] Update to v1.2.3 --- README.md | 4 +++- composer.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 60d4b41..00028e7 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,9 @@ Try it out yourself here: ([Online Demo](http://vsephpbb.github.io/passwordstren * Featured MOD of the Week in the phpBB Weekly Podcast, episode #166. ## Minimum Requirements -* phpBB 3.1.0 or phpBB 3.2.0 +* phpBB 3.1.0 +* phpBB 3.2.0 +* phpBB 3.3.0 * PHP 5.3.3 ## Install diff --git a/composer.json b/composer.json index 6dc1a4c..8ae5268 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "type": "phpbb-extension", "description": "An extension for phpBB that will show users how strong (or weak) their password is as they type it into the password field when creating or updating their account.", "homepage": "https://github.com/VSEphpbb/passwordstrength", - "version": "1.2.3-dev", + "version": "1.2.3", "keywords": ["phpbb", "extension", "password", "strength", "zxcvbn"], "license": "GPL-2.0-only", "authors": [