Trim white space before and after when adding password to a contact

This commit is contained in:
johnnyq
2023-06-22 10:29:27 -04:00
parent db9c102f53
commit 682407ad64

View File

@@ -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");
}