mirror of
https://github.com/moparisthebest/keepass2android
synced 2024-11-15 05:55:05 -05:00
improved OTP logging
don't accept empty key file silently
This commit is contained in:
parent
6604ae292b
commit
508a316cbb
@ -876,7 +876,7 @@ namespace keepass2android
|
|||||||
//no need to check for validity of password because if this method is called, the Ok button was enabled (i.e. there was a valid password)
|
//no need to check for validity of password because if this method is called, the Ok button was enabled (i.e. there was a valid password)
|
||||||
CompositeKey compositeKey = new CompositeKey();
|
CompositeKey compositeKey = new CompositeKey();
|
||||||
compositeKey.AddUserKey(new KcpPassword(_password));
|
compositeKey.AddUserKey(new KcpPassword(_password));
|
||||||
if ((KeyProviderType == KeyProviders.KeyFile) && (_keyFileOrProvider != ""))
|
if (KeyProviderType == KeyProviders.KeyFile)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -895,11 +895,12 @@ namespace keepass2android
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var lOtps = GetOtpsFromUi();
|
var lOtps = GetOtpsFromUi();
|
||||||
|
Kp2aLog.Log("received " + lOtps.Count + " otps.");
|
||||||
OathHotpKeyProv.CreateOtpSecret(lOtps, _otpInfo);
|
OathHotpKeyProv.CreateOtpSecret(lOtps, _otpInfo);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Kp2aLog.Log(e.ToString());
|
||||||
Toast.MakeText(this, GetString(Resource.String.OtpKeyError), ToastLength.Long).Show();
|
Toast.MakeText(this, GetString(Resource.String.OtpKeyError), ToastLength.Long).Show();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user