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
This commit is contained in:
Jakob Unterwurzacher 2021-06-03 22:01:04 +02:00
parent 8f2be5d93c
commit 015cd066e1
1 changed files with 1 additions and 1 deletions

View File

@ -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 {