mirror of
https://github.com/tmate-io/tmate.git
synced 2025-01-29 01:08:44 +01:00
When unlocking the server, don't try to clear the prompt on clients without a
prompt (such as the one issuing the unlock request). This caused the server to die if the wrong password was entered when unlocking from the command line with -U (nasty).
This commit is contained in:
parent
68e06fb6b7
commit
4c5c125173
@ -214,7 +214,7 @@ server_unlock(const char *s)
|
|||||||
wrong:
|
wrong:
|
||||||
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
for (i = 0; i < ARRAY_LENGTH(&clients); i++) {
|
||||||
c = ARRAY_ITEM(&clients, i);
|
c = ARRAY_ITEM(&clients, i);
|
||||||
if (c == NULL)
|
if (c == NULL || c->prompt_buffer == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
*c->prompt_buffer = '\0';
|
*c->prompt_buffer = '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user