From eb21eeb214519ebd90d8b32ffcf457c1f4a41623 Mon Sep 17 00:00:00 2001 From: thez3ro Date: Tue, 3 Oct 2017 14:51:15 +0200 Subject: [PATCH 01/11] Fix GoogleFallback/Screnlock settings --- src/gui/SettingsWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/SettingsWidget.cpp b/src/gui/SettingsWidget.cpp index e396f6043..420778be4 100644 --- a/src/gui/SettingsWidget.cpp +++ b/src/gui/SettingsWidget.cpp @@ -156,7 +156,7 @@ void SettingsWidget::loadSettings() m_secUi->lockDatabaseIdleSpinBox->setValue(config()->get("security/lockdatabaseidlesec").toInt()); m_secUi->lockDatabaseMinimizeCheckBox->setChecked(config()->get("security/lockdatabaseminimize").toBool()); m_secUi->lockDatabaseOnScreenLockCheckBox->setChecked(config()->get("security/lockdatabasescreenlock").toBool()); - m_secUi->lockDatabaseOnScreenLockCheckBox->setChecked(config()->get("security/IconDownloadFallbackToGoogle").toBool()); + m_secUi->fallbackToGoogle->setChecked(config()->get("security/IconDownloadFallbackToGoogle").toBool()); m_secUi->passwordCleartextCheckBox->setChecked(config()->get("security/passwordscleartext").toBool()); m_secUi->passwordRepeatCheckBox->setChecked(config()->get("security/passwordsrepeat").toBool()); From e53754d2025bd18780088e00d7575c59babc0b2c Mon Sep 17 00:00:00 2001 From: rockihack Date: Wed, 30 Aug 2017 20:26:01 +0200 Subject: [PATCH 02/11] Fix build on mac os with qt 5.9.1 --- src/crypto/SymmetricCipher.h | 4 ++-- src/crypto/SymmetricCipherBackend.h | 4 ++-- src/crypto/SymmetricCipherGcrypt.h | 4 ++-- src/format/KeePass2RandomStream.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/crypto/SymmetricCipher.h b/src/crypto/SymmetricCipher.h index 0070ed7de..b85c58b7c 100644 --- a/src/crypto/SymmetricCipher.h +++ b/src/crypto/SymmetricCipher.h @@ -59,11 +59,11 @@ public: return m_backend->process(data, ok); } - inline bool processInPlace(QByteArray& data) Q_REQUIRED_RESULT { + Q_REQUIRED_RESULT inline bool processInPlace(QByteArray& data) { return m_backend->processInPlace(data); } - inline bool processInPlace(QByteArray& data, quint64 rounds) Q_REQUIRED_RESULT { + Q_REQUIRED_RESULT inline bool processInPlace(QByteArray& data, quint64 rounds) { Q_ASSERT(rounds > 0); return m_backend->processInPlace(data, rounds); } diff --git a/src/crypto/SymmetricCipherBackend.h b/src/crypto/SymmetricCipherBackend.h index 8f19b8ed0..78ec60c60 100644 --- a/src/crypto/SymmetricCipherBackend.h +++ b/src/crypto/SymmetricCipherBackend.h @@ -29,8 +29,8 @@ public: virtual bool setIv(const QByteArray& iv) = 0; virtual QByteArray process(const QByteArray& data, bool* ok) = 0; - virtual bool processInPlace(QByteArray& data) Q_REQUIRED_RESULT = 0; - virtual bool processInPlace(QByteArray& data, quint64 rounds) Q_REQUIRED_RESULT = 0; + Q_REQUIRED_RESULT virtual bool processInPlace(QByteArray& data) = 0; + Q_REQUIRED_RESULT virtual bool processInPlace(QByteArray& data, quint64 rounds) = 0; virtual bool reset() = 0; virtual int blockSize() const = 0; diff --git a/src/crypto/SymmetricCipherGcrypt.h b/src/crypto/SymmetricCipherGcrypt.h index 367ee5b95..d3ad8d15b 100644 --- a/src/crypto/SymmetricCipherGcrypt.h +++ b/src/crypto/SymmetricCipherGcrypt.h @@ -35,8 +35,8 @@ public: bool setIv(const QByteArray& iv); QByteArray process(const QByteArray& data, bool* ok); - bool processInPlace(QByteArray& data) Q_REQUIRED_RESULT; - bool processInPlace(QByteArray& data, quint64 rounds) Q_REQUIRED_RESULT; + Q_REQUIRED_RESULT bool processInPlace(QByteArray& data); + Q_REQUIRED_RESULT bool processInPlace(QByteArray& data, quint64 rounds); bool reset(); int blockSize() const; diff --git a/src/format/KeePass2RandomStream.h b/src/format/KeePass2RandomStream.h index 022c8399f..584d738b3 100644 --- a/src/format/KeePass2RandomStream.h +++ b/src/format/KeePass2RandomStream.h @@ -29,7 +29,7 @@ public: bool init(const QByteArray& key); QByteArray randomBytes(int size, bool* ok); QByteArray process(const QByteArray& data, bool* ok); - bool processInPlace(QByteArray& data) Q_REQUIRED_RESULT; + Q_REQUIRED_RESULT bool processInPlace(QByteArray& data); QString errorString() const; private: From 91d746c5c096baeaf93a1a071cb4f7d9e0cbfaaf Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Tue, 3 Oct 2017 12:29:39 -0400 Subject: [PATCH 03/11] Corrected issues with desktop and tray icons in snap build --- CMakeLists.txt | 3 +++ snapcraft.yaml | 14 ++++++++++---- src/config-keepassx.h.cmake | 2 ++ src/core/FilePath.cpp | 12 ++++++++++++ 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 976b32937..c6d28a35f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,6 +52,9 @@ set(KEEPASSXC_VERSION_MINOR "2") set(KEEPASSXC_VERSION_PATCH "1") set(KEEPASSXC_VERSION "${KEEPASSXC_VERSION_MAJOR}.${KEEPASSXC_VERSION_MINOR}.${KEEPASSXC_VERSION_PATCH}") +# Special flag for snap builds +set(KEEPASSXC_SNAP_BUILD OFF CACHE BOOL "Set whether this is a build for snap or not") + if("${CMAKE_C_COMPILER}" MATCHES "clang$" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang") set(CMAKE_COMPILER_IS_CLANG 1) endif() diff --git a/snapcraft.yaml b/snapcraft.yaml index edd2cf227..c73b53289 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -12,7 +12,7 @@ apps: keepassxc: command: desktop-launch keepassxc plugs: [unity7, x11, opengl, gsettings, home, network, network-bind, removable-media, raw-usb] - desktop: share/applications/keepassxc.desktop + desktop: usr/share/applications/keepassxc.desktop cli: command: keepassxc-cli plugs: [gsettings, home, removable-media, raw-usb] @@ -23,6 +23,8 @@ parts: plugin: cmake configflags: - -DCMAKE_BUILD_TYPE=Release + - -DCMAKE_INSTALL_PREFIX=/usr + - -DKEEPASSXC_SNAP_BUILD=ON - -DWITH_TESTS=OFF - -DWITH_XC_AUTOTYPE=ON - -DWITH_XC_HTTP=ON @@ -39,6 +41,8 @@ parts: - libxtst-dev - libyubikey-dev - libykpers-1-dev + install: | + sed -i 's|Icon=keepassxc|Icon=${SNAP}/usr/share/icons/hicolor/256x256/apps/keepassxc.png|g' $SNAPCRAFT_PART_INSTALL/usr/share/applications/keepassxc.desktop after: [desktop-qt5] # Redefine desktop-qt5 stage packages to work with Ubuntu 17.04 @@ -55,10 +59,12 @@ parts: - locales-all # Overcome limitation in snapd to support URL loading (CTRL+U) + # client needs to install "snapd-xdg-open" on their system snapd-xdg-open: source: https://github.com/ubuntu-core/snapd-xdg-open.git - plugin: dump - organize: - data/xdg-open: bin/xdg-open + source-depth: 1 + plugin: nil + install: | + install -D -t $SNAPCRAFT_PART_INSTALL/usr/bin/ data/xdg-open stage-packages: - dbus diff --git a/src/config-keepassx.h.cmake b/src/config-keepassx.h.cmake index 9ae5f4836..f89d447c7 100644 --- a/src/config-keepassx.h.cmake +++ b/src/config-keepassx.h.cmake @@ -16,6 +16,8 @@ #cmakedefine WITH_XC_AUTOTYPE #cmakedefine WITH_XC_YUBIKEY +#cmakedefine KEEPASSXC_SNAP_BUILD + #cmakedefine HAVE_PR_SET_DUMPABLE 1 #cmakedefine HAVE_RLIMIT_CORE 1 #cmakedefine HAVE_PT_DENY_ATTACH 1 diff --git a/src/core/FilePath.cpp b/src/core/FilePath.cpp index 132fdc007..90311b40b 100644 --- a/src/core/FilePath.cpp +++ b/src/core/FilePath.cpp @@ -91,17 +91,29 @@ QString FilePath::pluginPath(const QString& name) QIcon FilePath::applicationIcon() { +#ifdef KEEPASSXC_SNAP_BUILD + return icon("apps", "keepassxc", false); +#else return icon("apps", "keepassxc"); +#endif } QIcon FilePath::trayIconLocked() { +#ifdef KEEPASSXC_SNAP_BUILD + return icon("apps", "keepassxc-locked", false); +#else return icon("apps", "keepassxc-locked"); +#endif } QIcon FilePath::trayIconUnlocked() { +#ifdef KEEPASSXC_SNAP_BUILD + return icon("apps", "keepassxc-unlocked", false); +#else return icon("apps", "keepassxc-unlocked"); +#endif } QIcon FilePath::icon(const QString& category, const QString& name, bool fromTheme) From 5098866413ea27378482a83b4247d5395a3faa98 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Tue, 3 Oct 2017 13:11:00 -0400 Subject: [PATCH 04/11] Rewrote resolveUrl function to conform to various test cases --- src/core/Entry.cpp | 33 ++++++++++++++++++--------------- tests/TestEntry.cpp | 28 ++++++++++++++++++++++++++++ tests/TestEntry.h | 1 + 3 files changed, 47 insertions(+), 15 deletions(-) diff --git a/src/core/Entry.cpp b/src/core/Entry.cpp index 7388b429e..64ce5297c 100644 --- a/src/core/Entry.cpp +++ b/src/core/Entry.cpp @@ -801,28 +801,31 @@ QString Entry::resolvePlaceholder(const QString& str) const QString Entry::resolveUrl(const QString& url) const { -#ifdef WITH_XC_HTTP QString newUrl = url; - if (!url.contains("://")) { + if (!url.isEmpty() && !url.contains("://")) { // URL doesn't have a protocol, add https by default newUrl.prepend("https://"); } - QUrl tempUrl = QUrl(newUrl); - if (tempUrl.isValid()) { - if (tempUrl.scheme() == "cmd") { - // URL is a cmd, hopefully the second argument is an URL - QStringList cmd = newUrl.split(" "); - if (cmd.size() > 1) { - return resolveUrl(cmd[1].remove("'").remove("\"")); + if (newUrl.startsWith("cmd://")) { + QStringList cmdList = newUrl.split(" "); + for (int i=1; i < cmdList.size(); ++i) { + // Don't pass arguments to the resolveUrl function (they look like URL's) + if (!cmdList[i].startsWith("-") && !cmdList[i].startsWith("/")) { + return resolveUrl(cmdList[i].remove(QRegExp("'|\""))); } - } else if (tempUrl.scheme() == "http" || tempUrl.scheme() == "https") { - // URL is nice - return tempUrl.url(); } + + // No URL in this command + return QString(""); } -#else - Q_UNUSED(url); -#endif + + // Validate the URL + QUrl tempUrl = QUrl(newUrl); + if (tempUrl.isValid() && (tempUrl.scheme() == "http" || tempUrl.scheme() == "https")) { + return tempUrl.url(); + } + + // No valid http URL's found return QString(""); } diff --git a/tests/TestEntry.cpp b/tests/TestEntry.cpp index 4d34cf31b..84ad03181 100644 --- a/tests/TestEntry.cpp +++ b/tests/TestEntry.cpp @@ -16,6 +16,7 @@ */ #include "TestEntry.h" +#include "config-keepassx-tests.h" #include @@ -130,3 +131,30 @@ void TestEntry::testClone() delete entryOrg; } + +void TestEntry::testResolveUrl() +{ + Entry* entry = new Entry(); + QString testUrl("www.google.com"); + QString testCmd("cmd://firefox " + testUrl); + QString testComplexCmd("cmd://firefox --start-now --url 'http://" + testUrl + "' --quit"); + QString nonHttpUrl("ftp://google.com"); + QString noUrl("random text inserted here"); + + // Test standard URL's + QCOMPARE(entry->resolveUrl(""), QString("")); + QCOMPARE(entry->resolveUrl(testUrl), "https://" + testUrl); + QCOMPARE(entry->resolveUrl("http://" + testUrl), "http://" + testUrl); + // Test cmd:// with no URL + QCOMPARE(entry->resolveUrl("cmd://firefox"), QString("")); + QCOMPARE(entry->resolveUrl("cmd://firefox --no-url"), QString("")); + // Test cmd:// with URL's + QCOMPARE(entry->resolveUrl(testCmd), "https://" + testUrl); + QCOMPARE(entry->resolveUrl(testComplexCmd), "http://" + testUrl); + // Test non-http URL + QCOMPARE(entry->resolveUrl(nonHttpUrl), QString("")); + // Test no URL + QCOMPARE(entry->resolveUrl(noUrl), QString("")); + + delete entry; +} diff --git a/tests/TestEntry.h b/tests/TestEntry.h index 0c97c0b9d..3f6d20ee3 100644 --- a/tests/TestEntry.h +++ b/tests/TestEntry.h @@ -31,6 +31,7 @@ private slots: void testHistoryItemDeletion(); void testCopyDataFrom(); void testClone(); + void testResolveUrl(); }; #endif // KEEPASSX_TESTENTRY_H From 4e903e4c50e46a8eed633821c9e6c1cf8df11019 Mon Sep 17 00:00:00 2001 From: frostasm Date: Wed, 4 Oct 2017 19:17:34 +0300 Subject: [PATCH 05/11] Fix memory leak in DatabaseTabWidget::openDatabase function --- src/gui/DatabaseTabWidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/DatabaseTabWidget.cpp b/src/gui/DatabaseTabWidget.cpp index 9dca1ac06..df0e1a1da 100644 --- a/src/gui/DatabaseTabWidget.cpp +++ b/src/gui/DatabaseTabWidget.cpp @@ -181,6 +181,7 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw, lockFile->tryLock(); } } else { + delete lockFile; return; } } From 4277364e91a858c4cf6a1f6764cbc23c3758c834 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Tue, 3 Oct 2017 15:40:15 -0400 Subject: [PATCH 06/11] Fixed cast warning --- src/core/Metadata.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Metadata.cpp b/src/core/Metadata.cpp index eb976d0e5..6377c5846 100644 --- a/src/core/Metadata.cpp +++ b/src/core/Metadata.cpp @@ -454,7 +454,7 @@ void Metadata::copyCustomIcons(const QSet& iconList, const Metadata* other QByteArray Metadata::hashImage(const QImage& image) { - auto data = QByteArray((char*)image.bits(), image.byteCount()); + auto data = QByteArray(reinterpret_cast(image.bits()), image.byteCount()); return QCryptographicHash::hash(data, QCryptographicHash::Md5); } From 157f1134bf3a82c7df829bd6b542468c0a76d466 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Sat, 7 Oct 2017 08:49:14 -0400 Subject: [PATCH 07/11] Select custom icon radio button after successful download --- src/gui/EditWidgetIcons.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/EditWidgetIcons.cpp b/src/gui/EditWidgetIcons.cpp index 691e93210..7c01b31f1 100644 --- a/src/gui/EditWidgetIcons.cpp +++ b/src/gui/EditWidgetIcons.cpp @@ -302,6 +302,7 @@ void EditWidgetIcons::addCustomIcon(const QImage &icon) } // Select the new or existing icon + updateRadioButtonCustomIcons(); QModelIndex index = m_customIconModel->indexFromUuid(uuid); m_ui->customIconsView->setCurrentIndex(index); } From 2e8175113172b89c1ee5768ed98dc37c7aba0065 Mon Sep 17 00:00:00 2001 From: Louis-Bertrand Varin Date: Sat, 7 Oct 2017 10:30:39 -0400 Subject: [PATCH 08/11] Backporting #1008 --- src/core/Database.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/Database.cpp b/src/core/Database.cpp index d1c0fea4d..d3f87a7b4 100644 --- a/src/core/Database.cpp +++ b/src/core/Database.cpp @@ -328,6 +328,15 @@ void Database::emptyRecycleBin() void Database::merge(const Database* other) { m_rootGroup->merge(other->rootGroup()); + + for (Uuid customIconId : other->metadata()->customIcons().keys()) { + QImage customIcon = other->metadata()->customIcon(customIconId); + if (!this->metadata()->containsCustomIcon(customIconId)) { + qDebug("Adding custom icon %s to database.", qPrintable(customIconId.toHex())); + this->metadata()->addCustomIcon(customIconId, customIcon); + } + } + emit modified(); } From 3bc8a79b9bca9dfc77d32846e8d5e344347bdca4 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Sat, 7 Oct 2017 21:25:42 -0400 Subject: [PATCH 09/11] Both slots on Yubikey are now polled for challenge/response --- src/gui/DatabaseOpenWidget.cpp | 29 +++++++++++++++++++------ src/gui/DatabaseOpenWidget.h | 2 ++ src/keys/drivers/YubiKey.cpp | 39 +++++++++++++++++++++++----------- src/keys/drivers/YubiKey.h | 5 +++++ 4 files changed, 56 insertions(+), 19 deletions(-) diff --git a/src/gui/DatabaseOpenWidget.cpp b/src/gui/DatabaseOpenWidget.cpp index 7d59f16cf..b8f8feb1d 100644 --- a/src/gui/DatabaseOpenWidget.cpp +++ b/src/gui/DatabaseOpenWidget.cpp @@ -70,9 +70,6 @@ DatabaseOpenWidget::DatabaseOpenWidget(QWidget* parent) connect(m_ui->buttonRedetectYubikey, SIGNAL(clicked()), SLOT(pollYubikey())); connect(m_ui->comboChallengeResponse, SIGNAL(activated(int)), SLOT(activateChallengeResponse())); - - connect(YubiKey::instance(), SIGNAL(detected(int,bool)), SLOT(yubikeyDetected(int,bool)), Qt::QueuedConnection); - connect(YubiKey::instance(), SIGNAL(notFound()), SLOT(noYubikeyFound()), Qt::QueuedConnection); #else m_ui->checkChallengeResponse->setVisible(false); m_ui->buttonRedetectYubikey->setVisible(false); @@ -98,10 +95,24 @@ void DatabaseOpenWidget::showEvent(QShowEvent* event) m_ui->editPassword->setFocus(); #ifdef WITH_XC_YUBIKEY + connect(YubiKey::instance(), SIGNAL(detected(int,bool)), SLOT(yubikeyDetected(int,bool)), Qt::QueuedConnection); + connect(YubiKey::instance(), SIGNAL(detectComplete()), SLOT(yubikeyDetectComplete()), Qt::QueuedConnection); + connect(YubiKey::instance(), SIGNAL(notFound()), SLOT(noYubikeyFound()), Qt::QueuedConnection); + pollYubikey(); #endif } +void DatabaseOpenWidget::hideEvent(QHideEvent* event) +{ + DialogyWidget::hideEvent(event); + +#ifdef WITH_XC_YUBIKEY + // Don't listen to any Yubikey events if we are hidden + disconnect(YubiKey::instance(), 0, this, 0); +#endif +} + void DatabaseOpenWidget::load(const QString& filename) { m_filename = filename; @@ -283,10 +294,6 @@ void DatabaseOpenWidget::yubikeyDetected(int slot, bool blocking) YkChallengeResponseKey yk(slot, blocking); // add detected YubiKey to combo box and encode blocking mode in LSB, slot number in second LSB m_ui->comboChallengeResponse->addItem(yk.getName(), QVariant((slot << 1) | blocking)); - m_ui->comboChallengeResponse->setEnabled(true); - m_ui->checkChallengeResponse->setEnabled(true); - m_ui->buttonRedetectYubikey->setEnabled(true); - m_ui->yubikeyProgress->setVisible(false); if (config()->get("RememberLastKeyFiles").toBool()) { QHash lastChallengeResponse = config()->get("LastChallengeResponse").toHash(); @@ -296,6 +303,14 @@ void DatabaseOpenWidget::yubikeyDetected(int slot, bool blocking) } } +void DatabaseOpenWidget::yubikeyDetectComplete() +{ + m_ui->comboChallengeResponse->setEnabled(true); + m_ui->checkChallengeResponse->setEnabled(true); + m_ui->buttonRedetectYubikey->setEnabled(true); + m_ui->yubikeyProgress->setVisible(false); +} + void DatabaseOpenWidget::noYubikeyFound() { m_ui->buttonRedetectYubikey->setEnabled(true); diff --git a/src/gui/DatabaseOpenWidget.h b/src/gui/DatabaseOpenWidget.h index 441e6418c..d4b47364d 100644 --- a/src/gui/DatabaseOpenWidget.h +++ b/src/gui/DatabaseOpenWidget.h @@ -51,6 +51,7 @@ signals: protected: void showEvent(QShowEvent* event) override; + void hideEvent(QHideEvent* event) override; CompositeKey databaseKey(); protected slots: @@ -63,6 +64,7 @@ private slots: void activateChallengeResponse(); void browseKeyFile(); void yubikeyDetected(int slot, bool blocking); + void yubikeyDetectComplete(); void noYubikeyFound(); protected: diff --git a/src/keys/drivers/YubiKey.cpp b/src/keys/drivers/YubiKey.cpp index b6f0d3098..4b98a6e48 100644 --- a/src/keys/drivers/YubiKey.cpp +++ b/src/keys/drivers/YubiKey.cpp @@ -25,6 +25,7 @@ #include #include +#include "core/Tools.h" #include "core/Global.h" #include "crypto/Random.h" @@ -112,23 +113,36 @@ bool YubiKey::deinit() void YubiKey::detect() { - if (init()) { - for (int i = 1; i < 3; i++) { - YubiKey::ChallengeResult result; - QByteArray rand = randomGen()->randomArray(1); - QByteArray resp; + bool found = false; + if (init()) { + YubiKey::ChallengeResult result; + QByteArray rand = randomGen()->randomArray(1); + QByteArray resp; + + // Check slot 1 and 2 for Challenge-Response HMAC capability + for (int i = 1; i <= 2; ++i) { result = challenge(i, false, rand, resp); - if (result == YubiKey::ALREADY_RUNNING) { - emit alreadyRunning(); - return; - } else if (result != YubiKey::ERROR) { - emit detected(i, result == YubiKey::WOULDBLOCK); - return; + if (result == ALREADY_RUNNING) { + // Try this slot again after waiting + Tools::sleep(300); + result = challenge(i, false, rand, resp); } + + if (result != ALREADY_RUNNING && result != ERROR) { + emit detected(i, result == WOULDBLOCK); + found = true; + } + // Wait between slots to let the yubikey settle + Tools::sleep(150); } } - emit notFound(); + + if (!found) { + emit notFound(); + } else { + emit detectComplete(); + } } bool YubiKey::getSerial(unsigned int& serial) @@ -160,6 +174,7 @@ YubiKey::ChallengeResult YubiKey::challenge(int slot, bool mayBlock, const QByte } // yk_challenge_response() insists on 64 byte response buffer */ + response.clear(); response.resize(64); /* The challenge sent to the yubikey should always be 64 bytes for diff --git a/src/keys/drivers/YubiKey.h b/src/keys/drivers/YubiKey.h index 1467b9fd1..328688f08 100644 --- a/src/keys/drivers/YubiKey.h +++ b/src/keys/drivers/YubiKey.h @@ -87,6 +87,11 @@ signals: */ void detected(int slot, bool blocking); + /** + * Emitted when detection is complete + */ + void detectComplete(); + /** * Emitted when the YubiKey was challenged and has returned a response. */ From 60215cf2cffb7471c654e8ca2f296f2a8d69feb1 Mon Sep 17 00:00:00 2001 From: frostasm Date: Tue, 10 Oct 2017 23:30:40 +0300 Subject: [PATCH 10/11] Add button for auto-type in the toolbar (#1026) --- src/gui/MainWindow.ui | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/MainWindow.ui b/src/gui/MainWindow.ui index 5991077f5..7e88bd9d4 100644 --- a/src/gui/MainWindow.ui +++ b/src/gui/MainWindow.ui @@ -292,6 +292,7 @@ + From 24333d0a19e064e3692de9d54822a96c82ad21c3 Mon Sep 17 00:00:00 2001 From: frostasm Date: Wed, 11 Oct 2017 17:03:51 +0300 Subject: [PATCH 11/11] Add toolbar button for copy url to clipboard --- .../icons/application/16x16/actions/url-copy.png | Bin 0 -> 900 bytes .../icons/application/22x22/actions/url-copy.png | Bin 0 -> 1338 bytes src/gui/MainWindow.cpp | 1 + src/gui/MainWindow.ui | 10 ++++++++++ 4 files changed, 11 insertions(+) create mode 100644 share/icons/application/16x16/actions/url-copy.png create mode 100644 share/icons/application/22x22/actions/url-copy.png diff --git a/share/icons/application/16x16/actions/url-copy.png b/share/icons/application/16x16/actions/url-copy.png new file mode 100644 index 0000000000000000000000000000000000000000..154d2439e868d1382cdad95e54d3e29ce3a04d21 GIT binary patch literal 900 zcmV-~1AF|5P)EC2Ruij@3N_;;X-GzaplSlbpLOLzide*}>1{`t=)L-ZZ_uX?mtmqiN^EoEiR-ecgLd@Si|e|D}KY<^3VE{cx@fOeR~BR2%wZI3sk`KN`&ft<`&Pf@W%v3G(mIcVYc1dj8RwM zz@x|6+u1{BYX>0(T5AHgB>;xKurl9ps42cDag6${_hVY1ZD`!SpW6BwQXPGyC*Nm2 zBP8QhYhXEny0huY7kdVe3_bF|5f*PnC_3N+L1j}F@d;6+^X>?z-agB#hdb!LucN#J zzScTrWT$^UH+ymZnR|MjgDtfYmJ1%PuLuQ#M8k^hwGl3SJx!#zNJsnbwFDxvnq*bB zIdS07%OibHAKa(fEUIG$m1+}pxx4sm*nj*1Fise a8TuD-9)CQ5m(O)6>iO{8~!aZg_cf-t?Te z=X>7wdA|4k4ujjqP)}2<)yXX_Ewx!$SzB3_RhdktzUJoUV_jWc^Z0*8sGFFmfGk;? z|ID+`zjNAT=ee9U>Bv}-2$$f;@XZ;RCx`6Y%G9G9Hsm}04b@;UjMdlIzt7$d9bKPY zwCa;bo-5Y|>cvRE0Zz6X z7k=|$c6Ju>Xz)egP{r)Z)d@Q|x=Dksa-6@RKw&D)wlI#tfh!?uEK7kU3Fdhl3`0Y> z+;s^up2zx9JK8--3Ww4?AWfT`biNc(G6z7zJ_{Es+V4}MsU}Nmb=~~FO1SRWsA%9gR z7zyxs0m%m>re?zzZ@~kF)p+#58r(9sqkHrOrY44=ikII79MRZ3{71L0s+&F(!_xs@| z9^bz@E|*T*>;fRrO8vBILf7b$3b8q-5K20uGGaqb>5J&=e+q9KYO$l~cx2-u2Ss@I z*Z{`6e?9yCiL#9)b)~hyoCR2L10vN~3cf(sDCATUC6JevjGNOE8ud-6f8}YUq@>&h z95vyKrc&3mz1PwuP1^{$=J|^lT%%;rHA6Fn(Mg~F9Y4k4HG>@NM@KH;Z}FV(8bG>jt0jYKU6#wW);jslEz+R*#+ zIW+98#_rv_Lsi;rwvdaW2nrsGxm>Pb{}DEp!T9OVoA>N&Yx_ZY?b}I=3LZ$39~OQD zl@)98;gQcG^n+4PO-+I0IA}DQh`y&7K`CrST?{`B#WkH1R8wtoU9eSLjb!(V~_G`HK$)$Ob6Y5l78E&6B; wADMUb+v0s@SR*FNqyJ}?SvL^|m7actionEntryAutoType->setIcon(filePath()->icon("actions", "auto-type", false)); m_ui->actionEntryCopyUsername->setIcon(filePath()->icon("actions", "username-copy", false)); m_ui->actionEntryCopyPassword->setIcon(filePath()->icon("actions", "password-copy", false)); + m_ui->actionEntryCopyURL->setIcon(filePath()->icon("actions", "url-copy", false)); m_ui->actionGroupNew->setIcon(filePath()->icon("actions", "group-new", false)); m_ui->actionGroupEdit->setIcon(filePath()->icon("actions", "group-edit", false)); diff --git a/src/gui/MainWindow.ui b/src/gui/MainWindow.ui index 7e88bd9d4..258dd90c8 100644 --- a/src/gui/MainWindow.ui +++ b/src/gui/MainWindow.ui @@ -292,6 +292,7 @@ + @@ -496,6 +497,9 @@ &Title + + Copy title to clipboard + @@ -504,6 +508,9 @@ &URL + + Copy URL to clipboard + @@ -512,6 +519,9 @@ &Notes + + Copy notes to clipboard +