From 2de64288300fd2380d0ec1140ba8b6ca6d55d8e1 Mon Sep 17 00:00:00 2001 From: cryzed Date: Fri, 20 Apr 2018 18:23:50 +0200 Subject: [PATCH] qute-pass: Also escape backslashes in the username --- misc/userscripts/qute-pass | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/misc/userscripts/qute-pass b/misc/userscripts/qute-pass index 3312c6cc9..4eddaf54c 100755 --- a/misc/userscripts/qute-pass +++ b/misc/userscripts/qute-pass @@ -150,6 +150,7 @@ def main(arguments): stderr('Failed to match username pattern on {}!'.format(arguments.username_target)) return ExitCodes.COULD_NOT_MATCH_USERNAME username = match.group(1) + username = username.replace('\\', '\\\\') # Match password match = re.match(arguments.password_pattern, secret) @@ -157,8 +158,6 @@ def main(arguments): stderr('Failed to match password pattern on secret!') return ExitCodes.COULD_NOT_MATCH_PASSWORD password = match.group(1) - - # Escape backslash so that they are inserted correctly password = password.replace('\\', '\\\\') insert_mode = ';; enter-mode insert' if arguments.insert_mode else ''