-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add middleware for conditional Scope report censoring #2515
Conversation
I really like this approach. Well done! |
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.
lgtm 👌
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.
🏄
users/client/middleware.go
Outdated
}); err != nil { | ||
q := r.URL.Query() | ||
q.Add("hideCommandLineArguments", "true") | ||
q.Add("hideEnvironmentVariables", "true") |
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.
If a malicious user has already included a hideEnvironmentVariables=false
in the querystring I wonder how the querystring parsing in scope will handle that.
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 https://golang.org/pkg/net/url/#Values.Set instead!
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 @foot, good catch, I'll use Set
instead!
92008ac
to
c32f3e7
Compare
Part of #2477 (comment) as suggested by @foot.
Depends on weaveworks/scope#3571.