Gopass: Second line of yaml file is indented wrongly

Created on 7 Jun 2019  路  8Comments  路  Source: gopasspw/gopass

Summary

Yaml indentation is broken while using gopass.

Steps To Reproduce

$ pass test
a:
  b:
    c: d
$ gopass test
a:
b:
    c: d

All indentation is done with double white space. It's just second line that looses two spaces.

Expected behavioUr

Both outputs look same

Environment

  • OS: Mac OS X High Mojave,
  • OS version: Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
  • gopass Version: gopass 1.8.5-git+HEAD go1.12.5 darwin amd64
    - gpg 2.2.16 - git 2.21.0 - fs 0.1.0
    Available Crypto Backends: gpgcli, openpgp, plain, xc
    Available RCS Backends: gitcli, noop
    Available Storage Backends: fs, inmem
  • Installation method: from source
bug pinned

All 8 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I think it's still a bug

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This is still a bug.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This is still a bug.

Thank you for reporting this issue.

Unfortunately this isn't easy to fix, due to the way we handle secrets.
We apply multiple heuristics and assumptions about secrets to support some more advanced features, e.g. we support YAML as well as simple Key/Value semantics and handle the first line of a secret in a special way (this is usually the password).

While there is no easy fix, the workaround for proper YAML handling is to prefix a secret containing YAML with an empty line and three dashes: ---.

While this is probably not what you were looking for, this report is still very much appreciated and is good input for our considerations how we might interpret secrets in the future, e.g. apply no heuristics at all or enforce a strict format.

I won't attempt to fix this as is.
It should be eventually covered by the linked issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Brixy picture Brixy  路  7Comments

gnosthi picture gnosthi  路  5Comments

fortrieb picture fortrieb  路  6Comments

nilskuhn picture nilskuhn  路  6Comments

prune998 picture prune998  路  6Comments