destructurama / attributed

Use attributes to control how complex types are logged to Serilog.
Apache License 2.0
263 stars 32 forks source link

LogMasked does not mask empty strings #57

Closed jstcyr closed 1 year ago

jstcyr commented 2 years ago

Hi,

[LogMasked] on an empty string doesn't mask the value, it returns an empty string. I would expect this behavior only when PreserveLength = true. Otherwise, I'd expect the string to be replaced to not leak the actual value.

What are your thoughts on this?

Thanks, Jonathan