Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard to understand error message when the identity file does not end with a \n #484

Open
douardda opened this issue Feb 6, 2024 · 0 comments

Comments

@douardda
Copy link

douardda commented Feb 6, 2024

Environment

  • OS: Debian 12
  • rage version: v0.10.0 (cargo install)

What were you trying to do

decrypt a test content using the following command line:

 rage --decrypt --identity /tmp/tmpnq_roxuq --output - /tmp/encrypted.bin

with an identity file like:

$ hexdump /tmp/tmpnq_roxuq 
0000000 4741 2d45 4553 5243 5445 4b2d 5945 312d
0000010 4d4b 3636 3953 3959 3859 4747 4646 3354
0000020 5446 434a 5853 4b37 4855 4847 5a46 5343
0000030 5a50 4448 5335 3439 5a43 4639 4846 3734
0000040 3443 5341 5148 5737 4455               
000004a

(so the actual key without any trailing character)

What happened

Following error message:

$ rage --decrypt --identity /tmp/tmpnq_roxuq --output - /tmp/encrypted.bin
Error: Tried to reset after the underlying buffer was exceeded.

[ Did rage not do what you expected? Could an error be more useful? ]
[ Tell us: https://str4d.xyz/rage/report                            ]

This used to work with rage < 0.10.

Thank you

Trundle added a commit to yaxitech/ragenix that referenced this issue Feb 12, 2024
Two changes due to rage's changed API:

* Disallow reading identities from stdin
* Allow overwriting output files

Also needed to add a newline to an identity in tests to work around
str4d/rage#484. This also affects users of
ragenix.
Trundle added a commit to yaxitech/ragenix that referenced this issue Feb 12, 2024
Two changes due to rage's changed API:

* Disallow reading identities from stdin
* Allow overwriting output files

Also needed to add a newline to an identity in tests to work around
str4d/rage#484. This also affects users of
ragenix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant