From 11e26a44100fae181223b68ffd29e85a6788bfd3 Mon Sep 17 00:00:00 2001 From: "C.J. O'Hara" Date: Mon, 23 Dec 2024 12:56:07 -0700 Subject: [PATCH] Remove hard-coded pin length in changePassword function --- module/VuFind/src/VuFind/ILS/Driver/SierraRest.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php b/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php index ba800766b89..274a16a8760 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php +++ b/module/VuFind/src/VuFind/ILS/Driver/SierraRest.php @@ -1725,17 +1725,7 @@ public function changePassword($details) 'success' => false, 'status' => 'authentication_error_invalid', ]; } - - if ($this->config['Authentication']['digits_only'] ?? false) { - $newPIN = preg_replace('/[^\d]/', '', trim($details['newPassword'])); - if (strlen($newPIN) != 4) { - return [ - 'success' => false, 'status' => 'password_error_invalid', - ]; - } - } else { - $newPIN = trim($details['newPassword']); - } + $newPIN = trim($details['newPassword']); $request = ['pin' => $newPIN]; $result = $this->makeRequest(