Throw 400's on incorrect 2FA data

This commit is contained in:
David Bomba 2021-03-17 00:40:58 +11:00
parent 0422c95e13
commit b762ea37d2
2 changed files with 3 additions and 3 deletions

View File

@ -62,11 +62,11 @@ class TwoFactorController extends BaseController
} elseif (! $secret || ! $google2fa->verifyKey($secret, $oneTimePassword)) { } elseif (! $secret || ! $google2fa->verifyKey($secret, $oneTimePassword)) {
return response()->json(['message' => ctrans('texts.invalid_one_time_password')]); return response()->json(['message' => ctrans('texts.invalid_one_time_password')], 400);
} }
return response()->json(['message' => 'No phone record or user is not confirmed']); return response()->json(['message' => 'No phone record or user is not confirmed'], 400);
} }

View File

@ -74,7 +74,7 @@ class Gateway extends StaticModel
* Returns an array of methods and the gatewaytypes possible * Returns an array of methods and the gatewaytypes possible
* *
* @return array * @return array
*///todo remove methods replace with gatewaytype:: and then nest refund / token billing */
public function getMethods() public function getMethods()
{ {
switch ($this->id) { switch ($this->id) {