Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/QUICKSTART.md12
-rw-r--r--src/gui/DatabaseTabWidget.cpp5
-rw-r--r--src/gui/DatabaseWidget.cpp25
-rw-r--r--src/gui/DatabaseWidget.h3
4 files changed, 36 insertions, 9 deletions
diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md
index 174808314..d6f059d80 100644
--- a/docs/QUICKSTART.md
+++ b/docs/QUICKSTART.md
@@ -123,3 +123,15 @@ There is a simple overview of shared groups to keep track of your data.
Sharing relies on the combination of file exports and imports as well as the synchronization mechanism provided by KeePassXC. Since the merge algorithm uses the history of entries to prevent data loss, this history must be enabled and have a sufficient size. Furthermore, the merge algorithm is location independend, therefore it does not matter if entries are moved outside of an import group. These entries will be updated none the less. Moving entries outside of export groups will prevent a further export of the entry, but it will not ensure that the already shared data will be removed from any client.
KeeShare uses a custom certification mechanism to ensure that the source of the data is the expected one. This ensures that the data was exported by the signer but it is not possible to detect if someone replaced the data with an older version from a valid signer. To prevent this, the container could be placed at a location which is only writeable for valid signers.
+
+## Using Auto Open
+
+The Auto Open feature automatically loads and unlocks additional databases when you unlock your main database.
+In order to use this functionnality, do the following:
+
+1. Create a group called **AutoOpen** at the root of your main database.
+1. In this group, create a new entry for each database that should be opened automatically:
+ * Put the *password of the database* in the **Password** field
+ * Put the *path to the database's file* in the **URL** field* (it can be formatted either as **file://**, a **/path/to/the/file** form, or a relative file path.)
+ * If the extra database requires a keyfile to be unlocked, put the *path to the keyfile* in the **Username** field. The path options are the same as for the database's file in the URL field.
+1. The next time you unlock your database these databases will be opened and unlocked automatically. \ No newline at end of file
diff --git a/src/gui/DatabaseTabWidget.cpp b/src/gui/DatabaseTabWidget.cpp
index 11b87cad3..8e7096a1c 100644
--- a/src/gui/DatabaseTabWidget.cpp
+++ b/src/gui/DatabaseTabWidget.cpp
@@ -201,8 +201,9 @@ void DatabaseTabWidget::addDatabaseTab(DatabaseWidget* dbWidget, bool inBackgrou
}
connect(dbWidget, SIGNAL(databaseFilePathChanged(QString, QString)), SLOT(updateTabName()));
- connect(
- dbWidget, SIGNAL(requestOpenDatabase(QString, bool, QString)), SLOT(addDatabaseTab(QString, bool, QString)));
+ connect(dbWidget,
+ SIGNAL(requestOpenDatabase(QString, bool, QString, QString)),
+ SLOT(addDatabaseTab(QString, bool, QString, QString)));
connect(dbWidget, SIGNAL(closeRequest()), SLOT(closeDatabaseTabFromSender()));
connect(dbWidget, SIGNAL(databaseModified()), SLOT(updateTabName()));
connect(dbWidget, SIGNAL(databaseSaved()), SLOT(updateTabName()));
diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp
index b5698aafc..05fc01ca3 100644
--- a/src/gui/DatabaseWidget.cpp
+++ b/src/gui/DatabaseWidget.cpp
@@ -987,10 +987,8 @@ void DatabaseWidget::unlockDatabase(bool accepted)
}
replaceDatabase(db);
if (db->isReadOnly()) {
- showMessage(tr("This database is opened in read-only mode. Autosave is disabled."),
- MessageWidget::Warning,
- false,
- -1);
+ showMessage(
+ tr("This database is opened in read-only mode. Autosave is disabled."), MessageWidget::Warning, false, -1);
}
restoreGroupEntryFocus(m_groupBeforeLock, m_entryBeforeLock);
@@ -1740,6 +1738,8 @@ void DatabaseWidget::processAutoOpen()
continue;
}
QFileInfo filepath;
+ QFileInfo keyfile;
+
if (entry->url().startsWith("file://")) {
QUrl url(entry->url());
filepath.setFile(url.toLocalFile());
@@ -1755,7 +1755,20 @@ void DatabaseWidget::processAutoOpen()
continue;
}
- // Request to open the database file in the background
- emit requestOpenDatabase(filepath.canonicalFilePath(), true, entry->password());
+ if (!entry->username().isEmpty()) {
+ if (entry->username().startsWith("file://")) {
+ QUrl keyfileUrl(entry->username());
+ keyfile.setFile(keyfileUrl.toLocalFile());
+ } else {
+ keyfile.setFile(entry->username());
+ if (keyfile.isRelative()) {
+ QFileInfo currentpath(m_db->filePath());
+ keyfile.setFile(currentpath.absoluteDir(), entry->username());
+ }
+ }
+ }
+
+ // Request to open the database file in the background with a password and keyfile
+ emit requestOpenDatabase(filepath.canonicalFilePath(), true, entry->password(), keyfile.canonicalFilePath());
}
}
diff --git a/src/gui/DatabaseWidget.h b/src/gui/DatabaseWidget.h
index aeb6a02e1..7f5e8099d 100644
--- a/src/gui/DatabaseWidget.h
+++ b/src/gui/DatabaseWidget.h
@@ -133,7 +133,8 @@ signals:
void currentModeChanged(DatabaseWidget::Mode mode);
void groupChanged();
void entrySelectionChanged();
- void requestOpenDatabase(const QString& filePath, bool inBackground, const QString& password);
+ void
+ requestOpenDatabase(const QString& filePath, bool inBackground, const QString& password, const QString& keyFile);
void databaseMerged(QSharedPointer<Database> mergedDb);
void groupContextMenuRequested(const QPoint& globalPos);
void entryContextMenuRequested(const QPoint& globalPos);