diff --git a/clientapi/php/client.php b/clientapi/php/client.php index d112749..a9c914b 100644 --- a/clientapi/php/client.php +++ b/clientapi/php/client.php @@ -227,7 +227,7 @@ array('paththree', "Laufwerk Z"), array('infotext', $result['comment']), array('room', $config['room']), - array('machinename', $config['machine']), + array('machinename', $config['name']), array('groupfolders', $groupfolders)); if ($config['requiresLogin'] == '0') { array_push($data, array('servicemode', 'noPasswordRequired')); diff --git a/clientapi/php/functions.php b/clientapi/php/functions.php index 39e2dc1..089e0af 100644 --- a/clientapi/php/functions.php +++ b/clientapi/php/functions.php @@ -28,7 +28,7 @@ function checkUserPassword($username, $password) { } $response = $stmt->get_result(); $result = $response->fetch_assoc(); - if (password_verify($password, $result["unix_hash"])) { + if (check_unix($password, $result["unix_hash"])) { return true; } return false; diff --git a/clientapi/php/hash.php b/clientapi/php/hash.php index f3b34c8..650e6cf 100644 --- a/clientapi/php/hash.php +++ b/clientapi/php/hash.php @@ -1,8 +1,18 @@ diff --git a/clientapi/php/register.php b/clientapi/php/register.php index 8d2176d..f6a49b7 100644 --- a/clientapi/php/register.php +++ b/clientapi/php/register.php @@ -2,6 +2,7 @@ /* Backend for PhilleConnect client registration © 2017 - 2020 Johannes Kreutz.*/ require "dbconnect.php"; + require "hash.php"; require "functions.php"; if (!isUserUnique($_POST["uname"])) { echo "error";