From 8bed8578adb39670b1cd8ec896093736ba5ab9a1 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 15 Oct 2023 20:17:51 +0000 Subject: [PATCH] Test different users logging in with the same password --- online-tests/test_0_login.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/online-tests/test_0_login.py b/online-tests/test_0_login.py index c985cce5..4d2da77f 100644 --- a/online-tests/test_0_login.py +++ b/online-tests/test_0_login.py @@ -12,6 +12,19 @@ class TestDovecot: imap.connect() imap.login(user, password) + def test_login_same_password(self, imap, gencreds): + """Test two different users logging in with the same password. + + This ensures that authentication process does not confuse the users + by using only the password hash as a key. + """ + user1, password1 = gencreds() + user2, _password2 = gencreds() + imap.connect() + imap.login(user1, password1) + imap.connect() + imap.login(user2, password1) + def test_login_fail(self, imap, gencreds): user, password = gencreds() imap.connect()