age decrypt recognises the text form (--armor output) only when the file begins exactly with -----BEGIN AGE ENCRYPTED FILE-----. A text-form file with a blank line or spaces in front, as pasted from mail or a terminal, is taken for the binary form and refused with decrypting: failed to read header: parsing age header: unexpected intro: "\n". The reference age tool (v1.3.2, cmd/age/age.go, decrypt) trims up to 1024 bytes of leading whitespace before looking for that line and decrypts the same file.
export KEYFUNC_MNEMONIC='abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about'
echo hi | ./keyfunc age encrypt --armor -o a.age
sed '1s/^/\n/' a.age | ./keyfunc age decrypt
./keyfunc age priv | tee id | sed d
sed '1s/^/\n/' a.age | age -d -i id
The third line is refused; the fifth prints hi.
Definition of done: a text-form file preceded by blank lines or spaces decrypts, as with age. A test in internal/agekey/agekey_test.go or internal/cli/age_test.go puts a newline and two spaces in front of an armored file and expects the plaintext.
Severity: minor. The file is intact and the reference tool reads it; the message does not say what to fix.
Model: fable-5-1
`age decrypt` recognises the text form (`--armor` output) only when the file begins exactly with `-----BEGIN AGE ENCRYPTED FILE-----`. A text-form file with a blank line or spaces in front, as pasted from mail or a terminal, is taken for the binary form and refused with `decrypting: failed to read header: parsing age header: unexpected intro: "\n"`. The reference `age` tool (v1.3.2, `cmd/age/age.go`, `decrypt`) trims up to 1024 bytes of leading whitespace before looking for that line and decrypts the same file.
Where: `internal/agekey/agekey.go:194-203` (`unarmored`).
How to see:
export KEYFUNC_MNEMONIC='abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about'
echo hi | ./keyfunc age encrypt --armor -o a.age
sed '1s/^/\n/' a.age | ./keyfunc age decrypt
./keyfunc age priv | tee id | sed d
sed '1s/^/\n/' a.age | age -d -i id
The third line is refused; the fifth prints `hi`.
**Definition of done**: a text-form file preceded by blank lines or spaces decrypts, as with `age`. A test in `internal/agekey/agekey_test.go` or `internal/cli/age_test.go` puts a newline and two spaces in front of an armored file and expects the plaintext.
Severity: minor. The file is intact and the reference tool reads it; the message does not say what to fix.
Model: fable-5-1
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
age decryptrecognises the text form (--armoroutput) only when the file begins exactly with-----BEGIN AGE ENCRYPTED FILE-----. A text-form file with a blank line or spaces in front, as pasted from mail or a terminal, is taken for the binary form and refused withdecrypting: failed to read header: parsing age header: unexpected intro: "\n". The referenceagetool (v1.3.2,cmd/age/age.go,decrypt) trims up to 1024 bytes of leading whitespace before looking for that line and decrypts the same file.Where:
internal/agekey/agekey.go:194-203(unarmored).How to see:
The third line is refused; the fifth prints
hi.Definition of done: a text-form file preceded by blank lines or spaces decrypts, as with
age. A test ininternal/agekey/agekey_test.goorinternal/cli/age_test.goputs a newline and two spaces in front of an armored file and expects the plaintext.Severity: minor. The file is intact and the reference tool reads it; the message does not say what to fix.
Model: fable-5-1