-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from paolostivanin/develop-1.4.0
Release 1.4.0
- Loading branch information
Showing
16 changed files
with
273 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- Copyright 2018 Paolo Stivanin <[email protected]> --> | ||
<!-- Copyright 2019 Paolo Stivanin <[email protected]> --> | ||
<component type="desktop-application"> | ||
<id type="desktop">com.github.paolostivanin.OTPClient.desktop</id> | ||
<metadata_license>CC-BY-4.0</metadata_license> | ||
|
@@ -83,6 +83,15 @@ It's also possible to import encrypted backups from andOTP and Authenticator+. | |
</content_rating> | ||
|
||
<releases> | ||
<release version="1.4.0" date="2019-02-23"> | ||
<description> | ||
<p>OTPClient 1.4.0 brings full support to andOTP.</p> | ||
<ul> | ||
<li>it's now possible to export encrypted andOTP backups</li> | ||
<li>use monospace to show the database path on startup</li> | ||
</ul> | ||
</description> | ||
</release> | ||
<release version="1.3.1" date="2018-10-31"> | ||
<description> | ||
<p>OTPClient 1.3.1 brings some fixes to bugs that were introduced with the previous version.</p> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#include <gtk/gtk.h> | ||
#include <gcrypt.h> | ||
#include <jansson.h> | ||
#include "password-cb.h" | ||
#include "message-dialogs.h" | ||
#include "gquarks.h" | ||
#include "db-misc.h" | ||
#include "exports.h" | ||
|
||
|
||
void | ||
export_data_cb (GSimpleAction *simple, | ||
GVariant *parameter __attribute__((unused)), | ||
gpointer user_data) | ||
{ | ||
const gchar *action_name = g_action_get_name (G_ACTION(simple)); | ||
AppData *app_data = (AppData *)user_data; | ||
|
||
const gchar *base_dir = NULL; | ||
#ifndef USE_FLATPAK_APP_FOLDER | ||
base_dir = g_get_home_dir (); | ||
#else | ||
base_dir = g_get_user_data_dir (); | ||
#endif | ||
|
||
gchar *password = prompt_for_password (app_data, NULL, NULL, TRUE); | ||
|
||
gchar *exported_file_path = NULL; | ||
if (g_strcmp0 (action_name, "export_andotp") == 0) { | ||
exported_file_path = g_build_filename (base_dir, "andotp_exports.json.aes", NULL); | ||
gchar *message = NULL; | ||
GtkMessageType msg_type; | ||
gchar *ret_msg = export_andotp (exported_file_path, password, app_data->db_data->json_data); | ||
if (ret_msg != NULL) { | ||
message = g_strconcat ("Error while exporting data: ", ret_msg, NULL); | ||
msg_type = GTK_MESSAGE_ERROR; | ||
} else { | ||
message = g_strconcat ("Data successfully exported to ", exported_file_path, NULL); | ||
msg_type = GTK_MESSAGE_INFO; | ||
} | ||
show_message_dialog (app_data->main_window, message, msg_type); | ||
g_free (message); | ||
g_free (ret_msg); | ||
}/* else if (g_strcmp0 (action_name, "export_authy") == 0) { | ||
// TODO: check authy format | ||
exported_file_path = g_build_filename (base_dir, "", NULL); | ||
export_authy (exported_file_path); | ||
} else if (g_strcmp0 (action_name, "export_winauth") == 0) { | ||
// TODO: check winauth format | ||
exported_file_path = g_build_filename (base_dir, "", NULL); | ||
export_winauth (exported_file_path); | ||
}*/ else { | ||
show_message_dialog (app_data->main_window, "Invalid export action.", GTK_MESSAGE_ERROR); | ||
return; | ||
} | ||
|
||
g_free (exported_file_path); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
|
||
#include <gtk/gtk.h> | ||
#include <jansson.h> | ||
|
||
G_BEGIN_DECLS | ||
|
||
#define ANDOTP_EXPORT_ACTION_NAME "export_andotp" | ||
#define AUTHY_EXPORT_ACTION_NAME "export_authy" | ||
#define WINAUTH_EXPORT_ACTION_NAME "export_winauth" | ||
|
||
void | ||
export_data_cb (GSimpleAction *simple, | ||
GVariant *parameter, | ||
gpointer user_data); | ||
|
||
gchar * | ||
export_andotp ( const gchar *export_path, | ||
const gchar *password, | ||
json_t *json_db_data); | ||
|
||
G_END_DECLS |
Oops, something went wrong.