From 682407ad6466ab841c536cf9e9484765d4815652 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Thu, 22 Jun 2023 10:29:27 -0400 Subject: [PATCH] Trim white space before and after when adding password to a contact --- post.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post.php b/post.php index 5b61cb70..b6ebca80 100644 --- a/post.php +++ b/post.php @@ -4276,7 +4276,7 @@ if(isset($_POST['edit_contact'])){ // Set password if(!empty($_POST['contact_password'])){ - $password_hash = password_hash($_POST['contact_password'], PASSWORD_DEFAULT); + $password_hash = password_hash(trim($_POST['contact_password']), PASSWORD_DEFAULT); mysqli_query($mysqli, "UPDATE contacts SET contact_password_hash = '$password_hash' WHERE contact_id = $contact_id AND contact_client_id = $client_id"); }