Do not give the user the secret.

This commit is contained in:
James Cole
2016-03-19 07:56:57 +01:00
parent a26acf4a25
commit fb165ef28b
4 changed files with 9 additions and 18 deletions

View File

@@ -18,8 +18,8 @@ use FireflyIII\Rules\Triggers\TriggerInterface;
use FireflyIII\User;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Validation\Validator;
use Input;
use Log;
use Session;
use Symfony\Component\Translation\TranslatorInterface;
/**
@@ -59,9 +59,7 @@ class FireflyValidator extends Validator
return false;
}
// Retrieve the secret from our hidden form field.
$secret = Input::get($parameters[0]);
$secret = Session::get('two-factor-secret');
$google2fa = app('PragmaRX\Google2FA\Google2FA');
return $google2fa->verifyKey($secret, $value);