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>2021-09-24 16:24:30 +0300
committerDaniel Teichmann <daniel.teichmann@das-netzwerkteam.de>2021-10-01 15:17:27 +0300
commit9477db1da213e27ff994b524c48eec0d70fa65e8 (patch)
tree51629307c6261aa47d6b371fbd9d9b56d3aff4f6 /plugins/x2go
parent2537b1cd04e7d8c914a9e6145308470afcfe8071 (diff)
x2go_plugin.c: Change behaviour to include username, when saving new credentials and let empty passwords happen.
Diffstat (limited to 'plugins/x2go')
-rw-r--r--plugins/x2go/x2go_plugin.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/plugins/x2go/x2go_plugin.c b/plugins/x2go/x2go_plugin.c
index 702325794..5c7f29f65 100644
--- a/plugins/x2go/x2go_plugin.c
+++ b/plugins/x2go/x2go_plugin.c
@@ -609,20 +609,28 @@ static gboolean remmina_plugin_x2go_exec_x2go(gchar *host,
if (remmina_plugin_service->protocol_plugin_init_get_savepassword(gp))
remmina_plugin_service->file_set_string(remminafile, "password", s_password);
+ // Should be renamed to protocol_plugin_init_get_savecredentials()?!
save = remmina_plugin_service->protocol_plugin_init_get_savepassword(gp);
if (save) {
// User has requested to save credentials. We put all the new credentials
// into remminafile->settings. They will be saved later, on successful
// connection, by rcw.c
- if (s_password) {
- remmina_plugin_service->file_set_string(remminafile,
- "password",
+ if (s_password && s_username) {
+ if (strcmp(s_username, "") == 0) {
+ REMMINA_PLUGIN_WARNING("%s", _("The user has requested to save a new "
+ "username but it couldn't get saved since "
+ "the given username is empty!"));
+ }
+
+ // We allow the possibility to set an empty password because a X2Go
+ // session can be still made using keyfiles or similar.
+ remmina_plugin_service->file_set_string(remminafile, "password",
s_password);
} else {
- REMMINA_PLUGIN_WARNING("%s", _("User requested storing credentials "
- "but 'password' is not set! Can't set "
- "a new default password then."));
+ REMMINA_PLUGIN_CRITICAL("%s", _("An error occured while trying to save "
+ "new credentials: 's_password' or "
+ "'s_username' strings were not set."));
}
}
if (s_username) {