1Password on Mastodon

op get document corrupts content on download

Community Member
edited October 2017 in CLI

I uploaded a random binary file via the CLI (dd if=/dev/random of=sample bs=1k count=32)

When downloaded again via the CLI, the file hash is different from the original.
Comparing a hexdump reveals, that the downloaded copy has an additional 0x0a at the end of it!

When downloaded via the GUI, this doesn't happen, the file hashes match.

This, of course, leads to all kinds of problems, breaking signatures etc.

1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided


  • Ohh... I think this one might actually be my fault. I think I specifically asked for that extra newline to be output so that the shell prompt would show up on a new line and look better. You're right, that shouldn't be there for the reasons you mentioned. A prettier shell experience shouldn't come at the cost of broken hashes.


  • I've filed issue 268 in our tracker so that we can fix this up.


  • dschnellerdschneller
    Community Member
    edited October 2017

    The newline is reasonable and useful.

    Some ideas:

    • add a -o <outputfile> option. If used, output to the file, don't add a newline.
    • add a --no-newline or (inverse) option
    • check if stdout is a tty and only append the newline if you are sure it is.

    I am clearly in favor of the 3rd option. It would seamlessly work interactively, but also when piping output into other processes or redirecting to a file.


  • I like those ideas. :)


This discussion has been closed.