Skip to content

Commit

Permalink
Show "Error" in KPOTP column if OTP settings are invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
Rookiestyle committed Jan 4, 2024
1 parent 38e293e commit 68c738c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/KeePassOTPColumnProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ public override string GetCellData(string strColumnName, PwEntry pe)
otp = OTPDAO.GetOTP(pe).GetOTP();
else
otp = OTPDAO.GetReadableOTP(pe);
bool bValid = otp != PluginTranslation.PluginTranslate.Error;
if (!string.IsNullOrEmpty(otp))
{
if (bForUsage || Config.OTPDisplay) return otp;
return PluginTranslation.PluginTranslate.TFADefined;
return bValid ? PluginTranslation.PluginTranslate.TFADefined : otp;
}

if (!Config.CheckTFA) return string.Empty;
Expand Down

0 comments on commit 68c738c

Please sign in to comment.