From 015cd066e1a857efd3d820a1ac29b89829ac72ed Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Thu, 3 Jun 2021 22:01:04 +0200 Subject: fido2: quote argument strings in debug output Tested using gocryptfs -init -debug -fido2 "hello world" cipherdir Output before: callFidoCommand: executing "/usr/bin/fido2-cred" with args [fido2-cred -M -h -v hello world] After: callFidoCommand: executing "/usr/bin/fido2-cred" with args ["fido2-cred" "-M" "-h" "-v" "hello world"] Related: https://github.com/rfjakob/gocryptfs/issues/571 --- internal/fido2/fido2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/fido2/fido2.go b/internal/fido2/fido2.go index ea8ffd8..cd63483 100644 --- a/internal/fido2/fido2.go +++ b/internal/fido2/fido2.go @@ -34,7 +34,7 @@ func callFidoCommand(command fidoCommand, device string, stdin []string) ([]stri case assertWithPIN: cmd = exec.Command("fido2-assert", "-G", "-h", "-v", device) } - tlog.Debug.Printf("callFidoCommand: executing %q with args %v", cmd.Path, cmd.Args) + tlog.Debug.Printf("callFidoCommand: executing %q with args %q", cmd.Path, cmd.Args) cmd.Stderr = os.Stderr in, err := cmd.StdinPipe() if err != nil { -- cgit v1.2.3