mirror of
https://github.com/FiloSottile/age.git
synced 2026-09-19 14:34:21 +00:00
age,cmd/age: improve error messages for mixed up identities/recipients
Not sure why ParseRecipients was hiding errors, when ParseIdentities doesn't. For #643
This commit is contained in:
@@ -87,9 +87,7 @@ func ParseRecipients(f io.Reader) ([]Recipient, error) {
|
||||
}
|
||||
r, err := parseRecipient(line)
|
||||
if err != nil {
|
||||
// Hide the error since it might unintentionally leak the contents
|
||||
// of confidential files.
|
||||
return nil, fmt.Errorf("malformed recipient at line %d", n)
|
||||
return nil, fmt.Errorf("error at line %d: %v", n, err)
|
||||
}
|
||||
recs = append(recs, r)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user