Skip to content

Commit

Permalink
passfile: drop byte counter from trailing garbage warning
Browse files Browse the repository at this point in the history
We don't know the exact value as we only read 2kiB.

Relates-to: #882
  • Loading branch information
rfjakob committed Dec 4, 2024
1 parent 8689105 commit 11f338f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/readpassword/passfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ func readPassFile(passfile string) ([]byte, error) {
return nil, fmt.Errorf("fatal: passfile: max password length (%d bytes) exceeded", maxPasswordLen)
}
if len(lines) > 1 && len(lines[1]) > 0 {
tlog.Warn.Printf("warning: passfile: ignoring trailing garbage (%d bytes) after first line",
len(lines[1]))
tlog.Warn.Printf("warning: passfile: ignoring trailing garbage after first line")
}
return lines[0], nil
}

0 comments on commit 11f338f

Please sign in to comment.