Fullname transformer doesn't work as expected with preserve_length = true
bug
## Bug description
I suspect there's a bug on this line: https://github.com/nucleuscloud/neosync/blob/main/worker/pkg/benthos/transformers/transform_full_name.go#L137
where I feel the left hand side should've been `newlastname`, instead of `newfirstname`?
I am getting unexpected output when `preserve_length` is set to true. When the input does not have a last name, (or a last name with length = 1) the buggy logic there causes unexpected transformations, like:
`John` -> `Filio Matsisabgoznmdytymfloqhxvvcgbkwkabfpddtdnqjgcwqehciglnvfizbpmlmmlksavsitxmtxztsvjkyuifususeeqf`
## How to reproduce
1. Use fullname transformer with `preserveLength = true`. Do not set a `maxLength`. It will default to 100.
2. Use any input you like as long as it does not contain a last name. For example `John`.
关闭于 2025-06-11 3 条评论