Handle secret values with = in them

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2021-12-27 11:06:27 +00:00
parent 2ed79284e3
commit 167c14cd6d
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

View File

@ -74,7 +74,7 @@ func main() {
// Parse secret text as individual secrets // Parse secret text as individual secrets
lines := strings.Split(item.SecretText, "\n") lines := strings.Split(item.SecretText, "\n")
for _, line := range lines { for _, line := range lines {
parts := strings.Split(line, "=") parts := strings.SplitN(line, "=", 2)
if len(parts) == 2 { if len(parts) == 2 {
s.Data[parts[0]] = []byte(parts[1]) s.Data[parts[0]] = []byte(parts[1])
} }