jetwhiz / encfs4win

Windows port of EncFS
https://encfs.win
Other
402 stars 41 forks source link

encfsctl cat outputs debug information and prompts to stdout #42

Closed RunasSudo closed 8 years ago

RunasSudo commented 8 years ago

Environment

encfsctl cat outputs debug information and prompts to stdout, along with the decrypted data.

Expected behavior

encfsctl cat should output debug information and prompts to stderr, with only decrypted data printed to stdout. This is the behaviour of the Linux version.

Steps to reproduce problem

  1. Run encfsctl -v cat [dir] [file] > out.txt.
  2. No output will be displayed at all, while all data (including debug messages and the EncFS Password: prompt) is stored in out.txt.

Not-at-all-robust workaround:

encfsctl cat [dir] [file] | tail -c+17 > out.txt
jetwhiz commented 8 years ago

When you mention the LInux version, are you referring to the version from the official Linux repositories, or the version directly from https://github.com/vgough/encfs (the latest commit)?

I'm thinking this is an issue due to easylogging++, which appears to support "To_Standard_Output" but not sending to standard error. If that's the case, than the latest from vgough/encfs should also have this issue.

jetwhiz commented 8 years ago

I'm not sure if we can fix the "prompts to stdout" issue, since this is the correct behavior (the prompt goes to stdout as it should, but you're redirecting stdout to a file). In this case, it is best to use -S to retrieve the password without prompts.

RunasSudo commented 8 years ago

I'm using encfs official release 1.8.1 on Arch Linux. Prompts in that version are written to stderr, so even if stdout is redirected, password prompts are visible. I'm not sure about debug information.

jetwhiz commented 8 years ago

Ok, I can fix the prompts (by sending them to stderr), but the issue of verbose debugging info going to stdout also exist in encfs upstream. I'm going to open an issue upstream so this can be fixed at the source.

jetwhiz commented 8 years ago

This should be fixed as of -RC7