From 51edbc1578fe49b281b39d91451d2b9df0092028 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sun, 8 Mar 2020 00:14:29 +0100 Subject: Improve login and registration pages (#2794) * Keep the user on login page on failure * Show an error if username already exists * Check the password format in the backend * Return a better message if username is invalid * Add a title to the login page * wip: Improve look of login and register pages * Set a capital M in username help message On the registration page, username tip started with a minuscule, while the password tip started with a capital. * Change message if username is taken --- tests/app/Utils/passwordUtilTest.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/app/Utils/passwordUtilTest.php (limited to 'tests') diff --git a/tests/app/Utils/passwordUtilTest.php b/tests/app/Utils/passwordUtilTest.php new file mode 100644 index 000000000..90c05004f --- /dev/null +++ b/tests/app/Utils/passwordUtilTest.php @@ -0,0 +1,27 @@ +assertTrue($ok); + } + + public function testCheckReturnsFalseIfEmpty() { + $password = ''; + + $ok = FreshRSS_password_Util::check($password); + + $this->assertFalse($ok); + } + + public function testCheckReturnsFalseIfLessThan7Characters() { + $password = '123456'; + + $ok = FreshRSS_password_Util::check($password); + + $this->assertFalse($ok); + } +} -- cgit v1.2.3