-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes to remove traced password #776
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment.
server/client.go
Outdated
return arg | ||
} | ||
m := passPat.FindAllSubmatch(arg, -1) | ||
// Take a copy of the connect proto just for the trace message. | ||
a := make([]byte, len(arg)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe place on the stack since it probably does not escape? Compiler may do this for you these days.
I used to do
var _raw [4096]byte
buf := _raw[:0]
buf = append(buf, ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated to take this approach.
fbe9710
to
ee367ec
Compare
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
ee367ec
to
a0fe8fd
Compare
LGTM |
Alternate approach to fix #762 and #766 continuing to use regex based approach to filter password entries from the log instead of using JSON.
Signed-off-by: Waldemar Quevedo wally@synadia.com
git pull --rebase origin master
)Resolves #762
/cc @nats-io/core