mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 01:58:07 +00:00
Fix FLEXIAPI-145 Put back the code as an alias for the confirmation_key in the...
This commit is contained in:
parent
1df1ca4ddf
commit
6da23a50a8
2 changed files with 11 additions and 1 deletions
|
|
@ -261,6 +261,11 @@ class AccountController extends Controller
|
|||
*/
|
||||
public function activateEmail(Request $request, string $sip)
|
||||
{
|
||||
// For retro-compatibility
|
||||
if ($request->has('code')) {
|
||||
$request->merge(['confirmation_key' => $request->get('code')]);
|
||||
}
|
||||
|
||||
$request->validate([
|
||||
'confirmation_key' => 'required|size:' . WebAuthenticateController::$emailCodeSize
|
||||
]);
|
||||
|
|
@ -285,6 +290,11 @@ class AccountController extends Controller
|
|||
*/
|
||||
public function activatePhone(Request $request, string $sip)
|
||||
{
|
||||
// For retro-compatibility
|
||||
if ($request->has('code')) {
|
||||
$request->merge(['confirmation_key' => $request->get('code')]);
|
||||
}
|
||||
|
||||
$request->validate([
|
||||
'confirmation_key' => 'required|digits:4'
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ class AccountProvisioningTest extends TestCase
|
|||
->assertStatus(200)
|
||||
->assertHeader('Content-Type', 'application/xml')
|
||||
->assertSee($password->account->username)
|
||||
->assertSee($password->account->display_name)
|
||||
->assertSee($password->account->display_name, false)
|
||||
->assertSee('ha1')
|
||||
->assertSee($password->account->passwords()->first()->password);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue