From 3695c049336a245082febe29ac74344901943813 Mon Sep 17 00:00:00 2001 From: Philipp Crocoll Date: Sun, 9 Dec 2018 08:22:45 +0100 Subject: [PATCH] avoid endless loops trying to open databases when loading fails. changelog 1.07-pre2 for release. --- src/PluginSdkBinding/PluginSdkBinding.csproj | 2 +- src/keepass2android/PasswordActivity.cs | 3 +++ src/keepass2android/Properties/AndroidManifest_net.xml | 4 ++-- src/keepass2android/Resources/values/strings.xml | 5 ++--- src/keepass2android/app/App.cs | 8 +++++++- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/PluginSdkBinding/PluginSdkBinding.csproj b/src/PluginSdkBinding/PluginSdkBinding.csproj index d93bc931..229ff6b3 100644 --- a/src/PluginSdkBinding/PluginSdkBinding.csproj +++ b/src/PluginSdkBinding/PluginSdkBinding.csproj @@ -55,7 +55,7 @@ - + diff --git a/src/keepass2android/PasswordActivity.cs b/src/keepass2android/PasswordActivity.cs index 4d8e13bd..9b81645f 100644 --- a/src/keepass2android/PasswordActivity.cs +++ b/src/keepass2android/PasswordActivity.cs @@ -695,8 +695,11 @@ namespace keepass2android { _keepPasswordInOnResume = true; } + } + App.Kp2a.RegisterOpenAttempt(_ioConnection); + SetContentView(Resource.Layout.password); InitializeToolbar(); diff --git a/src/keepass2android/Properties/AndroidManifest_net.xml b/src/keepass2android/Properties/AndroidManifest_net.xml index 9326a7a5..306a2654 100644 --- a/src/keepass2android/Properties/AndroidManifest_net.xml +++ b/src/keepass2android/Properties/AndroidManifest_net.xml @@ -1,7 +1,7 @@  diff --git a/src/keepass2android/Resources/values/strings.xml b/src/keepass2android/Resources/values/strings.xml index e70ad084..c0c54699 100644 --- a/src/keepass2android/Resources/values/strings.xml +++ b/src/keepass2android/Resources/values/strings.xml @@ -775,9 +775,8 @@ Show soft keyboard for password input when fingerprint scan is active. - Version 1.07-pre1\n - !!! Caution! This release comes with major changes under the hood. Please report any undesired behavior changes to crocoapps@gmail.com !!!\n - * Allow to open more than one database, allow to move entries between databases\n + Version 1.07-pre2\n + * Allow to open more than one database, compatible to KeeAutoExec\n * SFTP: Allow public key authentication, check if host key changed\n * Introduce pCloud support - thanks to gilbsgilbs!\n * Make Nextcloud support explicit\n diff --git a/src/keepass2android/app/App.cs b/src/keepass2android/app/App.cs index 8880f30c..bffb3c6c 100644 --- a/src/keepass2android/app/App.cs +++ b/src/keepass2android/app/App.cs @@ -361,7 +361,13 @@ namespace keepass2android public HashSet DirtyGroups { get { return dirty; } } - public bool AttemptedToOpenBefore(IOConnectionInfo ioc) + public void RegisterOpenAttempt(IOConnectionInfo ioc) + { + _openAttempts.Add(ioc); + } + + + public bool AttemptedToOpenBefore(IOConnectionInfo ioc) { foreach (var attemptedIoc in _openAttempts) {