From 2d117daaf11e6d2ea20b0adc8f239a1e2c900c14 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 7 Nov 2019 13:41:08 +0100 Subject: [PATCH] Fixed recovert account from confirmation key --- src/xmlrpc/accounts.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/xmlrpc/accounts.php b/src/xmlrpc/accounts.php index 3e7a94e..3341830 100644 --- a/src/xmlrpc/accounts.php +++ b/src/xmlrpc/accounts.php @@ -120,6 +120,18 @@ function xmlrpc_recover_account_from_confirmation_key($method, $args) { return $result; } + // If not found, try without algo + $password2 = new Password($db); + $password2->account_id = $account->id; + + if ($password2->getOne()) { + $result = array( + "password" => $password2->password, + "algorithm" => $password2->algorithm + ); + return $result; + } + return PASSWORD_NOT_FOUND; }