Skip to content

Commit

Permalink
Remove KeePassHttp plugin and qhttp (keepassxreboot#1752)
Browse files Browse the repository at this point in the history
Remove KeePassHttp plugin and qhttp
  • Loading branch information
droidmonkey authored Mar 31, 2018
1 parent bd654ea commit 410d88b
Show file tree
Hide file tree
Showing 66 changed files with 7 additions and 10,289 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,14 @@ set(WITH_XC_ALL OFF CACHE BOOLEAN "Build in all available plugins")
option(WITH_XC_AUTOTYPE "Include Auto-Type." ON)
option(WITH_XC_NETWORKING "Include networking code (e.g. for downlading website icons)." OFF)
option(WITH_XC_BROWSER "Include browser integration with keepassxc-browser." OFF)
option(WITH_XC_HTTP "Include KeePassHTTP-compatible browser integration (deprecated, implies WITH_NETWORKING)." OFF)
option(WITH_XC_YUBIKEY "Include YubiKey support." OFF)
option(WITH_XC_SSHAGENT "Include SSH agent support." OFF)

if(WITH_XC_HTTP)
message(WARNING "KeePassHTTP support has been deprecated and will be removed in a future version. Please use WITH_XC_BROWSER instead!\n"
"For enabling / disabling network access code, WITH_XC_HTTP has been replaced by WITH_XC_NETWORKING.")
set(WITH_XC_NETWORKING ON CACHE BOOL "Include networking code (e.g. for downlading website icons)." FORCE)
endif()

if(WITH_XC_ALL)
# Enable all options
set(WITH_XC_AUTOTYPE ON)
set(WITH_XC_NETWORKING ON)
set(WITH_XC_BROWSER ON)
set(WITH_XC_HTTP ON) # Deprecated
set(WITH_XC_YUBIKEY ON)
set(WITH_XC_SSHAGENT ON)
endif()
Expand Down
4 changes: 0 additions & 4 deletions COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,6 @@ Files: src/zxcvbn/zxcvbn.*
Copyright: 2015-2017, Tony Evans
License: MIT

Files: src/http/qhttp/*
Copyright: 2014, Amir Zamani
License: MIT

Files: src/gui/KMessageWidget.h
src/gui/KMessageWidget.cpp
Copyright: 2011 Aurélien Gâteau <[email protected]>
Expand Down
6 changes: 4 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,12 @@ These steps place the compiled KeePassXC binary inside the `./build/src/` direct

```
-DWITH_XC_AUTOTYPE=[ON|OFF] Enable/Disable Auto-Type (default: ON)
-DWITH_XC_HTTP=[ON|OFF] Enable/Disable KeePassHTTP and custom icon downloads (default: OFF)
-DWITH_XC_YUBIKEY=[ON|OFF] Enable/Disable YubiKey HMAC-SHA1 authentication support (default: OFF)
-DWITH_XC_BROWSER=[ON|OFF] Enable/Disable KeePassXC-Browser extension support (default: OFF)

-DWITH_XC_NETWORKING=[ON|OFF] Enable/Disable Networking support (favicon download) (default: OFF)
-DWITH_XC_ALL=[ON|OFF] Enable/Disable compiling all plugins above (default: OFF)
-DWITH_TESTS=[ON|OFF] Enable/Disable building of unit tests (default: ON)
-DWITH_GUI_TESTS=[ON|OFF] Enable/Disable building of GUI tests (default: OFF)
-DWITH_DEV_BUILD=[ON|OFF] Enable/Disable deprecated method warnings (default: OFF)
Expand Down
5 changes: 3 additions & 2 deletions docs/QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ for all your websites, programs, etc.
## Setting up Browser Integration with KeePassXC

* *Within KeePassXC*, go to **Tools->Settings** (on macOS, go to **KeePassXC->Preferences**.)
* In **Browser Integration**, check **Enable KeePassHTTP server**
* In **Browser Integration**, check **Enable KeePassXC browser integration**
* Right below that, click the checkbox for the browser(s) you use
Leave the other options at their defaults.
* *In your default web browser,* install the KeePassHTTP-Connector extension/add-on. Instructions for [Firefox](https://addons.mozilla.org/en-US/firefox/addon/keepasshttp-connector/?src=api) or [Chrome](https://chrome.google.com/webstore/detail/keepasshttp-connector/dafgdjggglmmknipkhngniifhplpcldb?utm_source=chrome-app-launcher-info-dialog)
* *In your default web browser,* install the KeePassXC Browser extension/add-on. Instructions for [Firefox](https://addons.mozilla.org/en-US/firefox/addon/keepassxc-browser/) or [Chrome](https://chrome.google.com/webstore/detail/keepassxc-browser/oboonakemofpalcgghocfoadofidjkkk)
* Click the KeePassXC icon in the upper-right corner. You'll see the dialog below.
* Click the blue Connect button to make the browser extension connect to the KeePassXC application.
<img src="./KeePassXC-Connect.png" height="200" alt="KeePassXC Connect dialog">
Expand Down
3 changes: 0 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,9 @@ set(keepassx_SOURCES_MAINEXE
add_feature_info(Auto-Type WITH_XC_AUTOTYPE "Automatic password typing")
add_feature_info(Networking WITH_XC_NETWORKING "Compile KeePassXC with network access code (e.g. for downloading website icons)")
add_feature_info(KeePassXC-Browser WITH_XC_BROWSER "Browser integration with KeePassXC-Browser")
add_feature_info(KeePassHTTP WITH_XC_HTTP "Browser integration compatible with ChromeIPass and PassIFox (deprecated, implies Networking)")
add_feature_info(SSHAgent WITH_XC_SSHAGENT "SSH agent integration compatible with KeeAgent")
add_feature_info(YubiKey WITH_XC_YUBIKEY "YubiKey HMAC-SHA1 challenge-response")

add_subdirectory(http)
if(WITH_XC_NETWORKING)
find_package(CURL REQUIRED)
endif()
Expand Down Expand Up @@ -254,7 +252,6 @@ add_library(keepassx_core STATIC ${keepassx_SOURCES})
set_target_properties(keepassx_core PROPERTIES COMPILE_DEFINITIONS KEEPASSX_BUILDING_CORE)
target_link_libraries(keepassx_core
autotype
${keepassxchttp_LIB}
${keepassxcbrowser_LIB}
${sshagent_LIB}
Qt5::Core
Expand Down
1 change: 0 additions & 1 deletion src/config-keepassx.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#cmakedefine WITH_XC_AUTOTYPE
#cmakedefine WITH_XC_NETWORKING
#cmakedefine WITH_XC_BROWSER
#cmakedefine WITH_XC_HTTP
#cmakedefine WITH_XC_YUBIKEY
#cmakedefine WITH_XC_SSHAGENT

Expand Down
3 changes: 0 additions & 3 deletions src/gui/AboutDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ AboutDialog::AboutDialog(QWidget* parent)
#ifdef WITH_XC_BROWSER
extensions += "\n- " + tr("Browser Integration");
#endif
#ifdef WITH_XC_HTTP
extensions += "\n- " + tr("Legacy Browser Integration (KeePassHTTP)");
#endif
#ifdef WITH_XC_SSHAGENT
extensions += "\n- " + tr("SSH Agent");
#endif
Expand Down
79 changes: 0 additions & 79 deletions src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@
#include "gui/MessageBox.h"
#include "gui/SearchWidget.h"

#ifdef WITH_XC_HTTP
#include "http/Service.h"
#include "http/HttpSettings.h"
#include "http/OptionDialog.h"
#endif

#ifdef WITH_XC_SSHAGENT
#include "sshagent/AgentSettingsPage.h"
#include "sshagent/SSHAgent.h"
Expand All @@ -65,53 +59,6 @@
#include "gui/SettingsWidget.h"
#include "gui/PasswordGeneratorWidget.h"

#ifdef WITH_XC_HTTP
class HttpPlugin: public ISettingsPage
{
public:
HttpPlugin(DatabaseTabWidget* tabWidget)
{
m_service = new Service(tabWidget);
}

~HttpPlugin() = default;

QString name() override
{
return QObject::tr("Legacy Browser Integration");
}

QIcon icon() override
{
return FilePath::instance()->icon("apps", "internet-web-browser");
}

QWidget * createWidget() override
{
OptionDialog* dlg = new OptionDialog();
QObject::connect(dlg, SIGNAL(removeSharedEncryptionKeys()), m_service, SLOT(removeSharedEncryptionKeys()));
QObject::connect(dlg, SIGNAL(removeStoredPermissions()), m_service, SLOT(removeStoredPermissions()));
return dlg;
}

void loadSettings(QWidget* widget) override
{
qobject_cast<OptionDialog*>(widget)->loadSettings();
}

void saveSettings(QWidget* widget) override
{
qobject_cast<OptionDialog*>(widget)->saveSettings();
if (HttpSettings::isEnabled())
m_service->start();
else
m_service->stop();
}
private:
Service* m_service;
};
#endif

#ifdef WITH_XC_BROWSER
class BrowserPlugin: public ISettingsPage
{
Expand Down Expand Up @@ -193,9 +140,6 @@ MainWindow::MainWindow()
#ifdef WITH_XC_BROWSER
m_ui->settingsWidget->addSettingsPage(new BrowserPlugin(m_ui->tabWidget));
#endif
#ifdef WITH_XC_HTTP
m_ui->settingsWidget->addSettingsPage(new HttpPlugin(m_ui->tabWidget));
#endif
#ifdef WITH_XC_SSHAGENT
SSHAgent::init(this);
connect(SSHAgent::instance(), SIGNAL(error(QString)), this, SLOT(showErrorMessage(QString)));
Expand Down Expand Up @@ -419,42 +363,19 @@ MainWindow::MainWindow()
m_ui->globalMessageWidget->showMessage(
tr("Access error for config file %1").arg(config()->getFileName()), MessageWidget::Error);
}
#ifdef WITH_XC_HTTP
if (config()->get("Http/Enabled", false).toBool() && config()->get("Http/DeprecationNoticeShown", 0).toInt() < 3) {
// show message after global widget dismissed all messages
connect(m_ui->globalMessageWidget, SIGNAL(hideAnimationFinished()), this, SLOT(showKeePassHTTPDeprecationNotice()));
}
#endif

#ifndef KEEPASSXC_BUILD_TYPE_RELEASE
m_ui->globalMessageWidget->showMessage(tr("WARNING: You are using an unstable build of KeePassXC!\n"
"There is a high risk of corruption, maintain a backup of your databases.\n"
"This version is not meant for production use."),
MessageWidget::Warning, -1);
#else
// Show the HTTP deprecation message if enabled above
emit m_ui->globalMessageWidget->hideAnimationFinished();
#endif
}

MainWindow::~MainWindow()
{
}

void MainWindow::showKeePassHTTPDeprecationNotice()
{
int warningNum = config()->get("Http/DeprecationNoticeShown", 0).toInt();
displayGlobalMessage(tr("<p>It looks like you are using KeePassHTTP for browser integration. "
"This feature has been deprecated and will be removed in the future.<br>"
"Please switch to KeePassXC-Browser instead! For help with migration, "
"visit our <a class=\"link\" href=\"https://keepassxc.org/docs/keepassxc-browser-migration\">"
"migration guide</a> (warning %1 of 3).</p>").arg(warningNum + 1),
MessageWidget::Warning, true, -1);

config()->set("Http/DeprecationNoticeShown", warningNum + 1);
disconnect(m_ui->globalMessageWidget, SIGNAL(hideAnimationFinished()), this, SLOT(showKeePassHTTPDeprecationNotice()));
}

void MainWindow::showErrorMessage(const QString& message)
{
m_ui->globalMessageWidget->showMessage(message, MessageWidget::Error);
Expand Down
1 change: 0 additions & 1 deletion src/gui/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ private slots:
void repairDatabase();
void hideTabMessage();
void handleScreenLock();
void showKeePassHTTPDeprecationNotice();
void showErrorMessage(const QString& message);

private:
Expand Down
61 changes: 0 additions & 61 deletions src/http/AccessControlDialog.cpp

This file was deleted.

48 changes: 0 additions & 48 deletions src/http/AccessControlDialog.h

This file was deleted.

Loading

0 comments on commit 410d88b

Please sign in to comment.