From 8d9c977d492debdc0e9a922a939d38fe30c12d77 Mon Sep 17 00:00:00 2001 From: Tina_Azure <-> Date: Sun, 9 Jul 2023 02:11:58 +0200 Subject: [PATCH] Issue #32 Fix password comparison oversight --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 7b89d90..f9ac6c6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -578,7 +578,7 @@ int main(int argc, char *argv[]) { } //check if signup data is complete - if (!email.empty() && !name.empty() && !password.empty() && password.compare(passwordConfirmation) != 0) + if (!email.empty() && !name.empty() && !password.empty() && password == passwordConfirmation) requestFillCompletion = true; if (requestFillCompletion) { @@ -619,7 +619,7 @@ int main(int argc, char *argv[]) { } else { ctx[MUSTACHE_REGISTRATION_ERROR] = true; - if (password.compare(passwordConfirmation) != 0) + if (password != passwordConfirmation) ctx[MUSTACHE_REGISTRATION_ERROR_PASS_CONFIRMATION] = true; ctx[MUSTACHE_REGISTRATION_ERROR_EMAIL_NAME_PASS_NOT_FILLED] = true; }