mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Throw 400's on incorrect 2FA data
This commit is contained in:
parent
0422c95e13
commit
b762ea37d2
@ -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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user