Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passkeys: Add warning on export #10411

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions share/translations/keepassxc_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9047,6 +9047,14 @@ Kernel: %3 %4</source>
<source> (Expired)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Export Confirmation</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>The passkey file will be vulnerable to theft and unauthorized use, if left unsecured. Are you sure you want to continue?</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ReportsWidgetStatistics</name>
Expand Down
13 changes: 12 additions & 1 deletion src/gui/reports/ReportsWidgetPasskeys.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 KeePassXC Team <team@keepassxc.org>
* Copyright (C) 2024 KeePassXC Team <team@keepassxc.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -24,6 +24,7 @@
#include "core/Metadata.h"
#include "gui/GuiTools.h"
#include "gui/Icons.h"
#include "gui/MessageBox.h"
#include "gui/passkeys/PasskeyExporter.h"
#include "gui/passkeys/PasskeyImporter.h"
#include "gui/styles/StateColorPalette.h"
Expand Down Expand Up @@ -289,6 +290,16 @@ void ReportsWidgetPasskeys::importPasskey()

void ReportsWidgetPasskeys::exportPasskey()
{
auto answer = MessageBox::question(this,
tr("Export Confirmation"),
tr("The passkey file will be vulnerable to theft and unauthorized use, if left "
"unsecured. Are you sure you want to continue?"),
MessageBox::Yes | MessageBox::No,
MessageBox::No);
if (answer != MessageBox::Yes) {
return;
}

PasskeyExporter passkeyExporter;
passkeyExporter.showExportDialog(getSelectedEntries());
}
Loading