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

gitlab.com/Remmina/Remmina.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2022-09-07 18:24:33 +0300
committerDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2022-09-23 16:52:33 +0300
commit53f4b3d2b5e915aa120521983c99a034666079dc (patch)
tree1f40a969d2e79254895a168b05193ed478667c9e
parent4a2f16238129a944bf69dff036cd74245c28cc01 (diff)
plugins/x2go/x2go_plugin.c: Don't print password of --ssh-passphrase.pr/2781-x2go-custom-ssh-privkeys
-rw-r--r--plugins/x2go/x2go_plugin.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/plugins/x2go/x2go_plugin.c b/plugins/x2go/x2go_plugin.c
index 1485da7a2..ba19455e4 100644
--- a/plugins/x2go/x2go_plugin.c
+++ b/plugins/x2go/x2go_plugin.c
@@ -937,15 +937,18 @@ static gchar* rmplugin_x2go_spawn_pyhoca_process(guint argc, gchar* argv[],
REMMINA_PLUGIN_INFO("%s", _("Started PyHoca-CLI with the following arguments:"));
// Print every argument except passwords. Free all arg strings.
for (gint i = 0; i < argc - 1; i++) {
- if (g_strcmp0(argv[i], "--password") == 0) {
- g_printf("%s ", argv[i]);
+ gchar* curr_arg = argv[i];
+
+ if (g_str_equal(curr_arg, "--password") ||
+ g_str_equal(curr_arg, "--ssh-passphrase")) {
+ g_printf("%s ", curr_arg);
g_printf("XXXXXX ");
- g_free(argv[i]);
+ g_free(curr_arg);
g_free(argv[++i]);
continue;
} else {
- g_printf("%s ", argv[i]);
- g_free(argv[i]);
+ g_printf("%s ", curr_arg);
+ g_free(curr_arg);
}
}
g_printf("\n");
@@ -2546,15 +2549,18 @@ static gboolean rmplugin_x2go_exec_x2go(gchar *host,
REMMINA_PLUGIN_INFO("%s", _("Started PyHoca-CLI with the following arguments:"));
// Print every argument except passwords. Free all arg strings.
for (gint i = 0; i < argc - 1; i++) {
- if (g_strcmp0(argv[i], "--password") == 0) {
- g_printf("%s ", argv[i]);
+ gchar* curr_arg = argv[i];
+
+ if (g_str_equal(curr_arg, "--password") ||
+ g_str_equal(curr_arg, "--ssh-passphrase")) {
+ g_printf("%s ", curr_arg);
g_printf("XXXXXX ");
- g_free (argv[i]);
- g_free (argv[++i]);
+ g_free(curr_arg);
+ g_free(argv[++i]);
continue;
} else {
- g_printf("%s ", argv[i]);
- g_free (argv[i]);
+ g_printf("%s ", curr_arg);
+ g_free(curr_arg);
}
}
g_printf("\n");