Compare commits

..

1 Commits

Author SHA1 Message Date
Philipp Crocoll
dfd101da77 do not log folder name to fix #2466 2024-01-02 16:34:30 +01:00
2 changed files with 15 additions and 7 deletions

View File

@@ -31,8 +31,17 @@ namespace PluginTOTP
_muteWarnings = muteWarnings;
}
internal bool HasSeed(IDictionary<string, string> entryFields)
/// <summary>
/// Check if specified Entry contains Settings that are not null.
/// </summary>
internal bool SettingsCheck(IDictionary<string, string> entryFields)
{
string settings;
entryFields.TryGetValue(SettingsFieldName, out settings);
return !String.IsNullOrEmpty(settings);
}
internal bool SeedCheck(IDictionary<string, string> entryFields)
{
string seed;
entryFields.TryGetValue(SeedFieldName, out seed);
@@ -91,15 +100,15 @@ namespace PluginTOTP
}
private string[] SettingsGet(IDictionary<string, string> entryFields)
{
return entryFields.TryGetValue(SettingsFieldName, out var settings) ? settings.Split(';') : new[] { "30", "6" };
}
{
return entryFields[SettingsFieldName].Split(';');
}
public TotpData GetTotpData(IDictionary<string, string> entryFields)
{
TotpData res = new TotpData();
if (HasSeed(entryFields))
if (SettingsCheck(entryFields) && SeedCheck(entryFields))
{
bool ValidInterval; bool ValidLength; bool ValidUrl;
if (SettingsValidate(entryFields, out ValidInterval, out ValidLength, out ValidUrl))

View File

@@ -80,7 +80,6 @@ namespace keepass2android.view
private void PopulateView(View gv, PwGroup pw)
{
_pwGroup = pw;
Kp2aLog.Log($"Populating group view {_groupBaseActivity.IsFinishing} {pw.Name}");
if (_groupBaseActivity.IsFinishing)
return;