Skip to content

Commit a00cf30

Browse files
authored
Merge pull request #177 from pkern/disable-bracketed-paste
Disable bracketed paste
2 parents a5033bb + 7e1e1e7 commit a00cf30

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

login/login.c

+5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include "ui.h"
4242

4343
#define PROMPT "> "
44+
#define BRACKETED_PASTE_FINISH "\033[?2004l\r"
4445

4546
#define DMI_UUID_PATH "/sys/class/dmi/id/product_uuid"
4647
#define DMI_UUID_SIZE 36
@@ -270,6 +271,10 @@ int login_prompt(glome_login_config_t* config, pam_handle_t* pamh,
270271
UNUSED(pamh);
271272
UNUSED(error_tag);
272273

274+
// Disable bracketed paste. Special characters in the auth tag cause
275+
// authentication to fail.
276+
puts(BRACKETED_PASTE_FINISH);
277+
273278
puts(message);
274279
fputs(PROMPT, stdout);
275280
fflush(NULL);

0 commit comments

Comments
 (0)