mirror of
https://github.com/profanity-im/profanity.git
synced 2024-09-29 19:56:07 -04:00
Strip only trailing newline from eval_password
This commit is contained in:
parent
6529220351
commit
ec28888915
@ -154,7 +154,10 @@ cmd_connect(gchar **args, struct cmd_help_t help)
|
|||||||
cons_show("Error evaluating password, see logs for details.");
|
cons_show("Error evaluating password, see logs for details.");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
g_strstrip(account->password);
|
// strip trailing newline
|
||||||
|
if (g_str_has_suffix(account->password, "\n")) {
|
||||||
|
account->password[strlen(account->password)-1] = '\0';
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log_error("popen failed when running eval_password.");
|
log_error("popen failed when running eval_password.");
|
||||||
cons_show("Error evaluating password, see logs for details.");
|
cons_show("Error evaluating password, see logs for details.");
|
||||||
|
Loading…
Reference in New Issue
Block a user