mirror of
https://github.com/getsops/sops.git
synced 2026-02-05 12:45:21 +01:00
Do not put sensitive value into error message when the key can be printed as well.
Signed-off-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -242,7 +242,7 @@ func main() {
|
||||
var env []string
|
||||
for _, item := range tree.Branches[0] {
|
||||
if dotenv.IsComplexValue(item.Value) {
|
||||
return cli.NewExitError(fmt.Errorf("cannot use complex value in environment: %s", item.Value), codes.ErrorGeneric)
|
||||
return cli.NewExitError(fmt.Errorf("cannot use complex value in environment; key is %s", item.Key), codes.ErrorGeneric)
|
||||
}
|
||||
if _, ok := item.Key.(sops.Comment); ok {
|
||||
continue
|
||||
|
||||
@@ -139,7 +139,7 @@ func (store *Store) EmitPlainFile(in sops.TreeBranches) ([]byte, error) {
|
||||
buffer := bytes.Buffer{}
|
||||
for _, item := range in[0] {
|
||||
if IsComplexValue(item.Value) {
|
||||
return nil, fmt.Errorf("cannot use complex value in dotenv file: %s", item.Value)
|
||||
return nil, fmt.Errorf("cannot use complex value in dotenv file; key is %s", item.Key)
|
||||
}
|
||||
var line string
|
||||
if comment, ok := item.Key.(sops.Comment); ok {
|
||||
|
||||
Reference in New Issue
Block a user