Skip to content
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

Should have a way to filter things out of the logs. Poses a security issue as it stands. #132

Open
Altonymous opened this issue May 4, 2013 · 4 comments

Comments

@Altonymous
Copy link

I think there needs to be a way to create a "safe" list so that certain things are scrubbed from the logs

For instance

Params: map[username:Altonymous password:1234 confirm_password:1234 handle:Altonymous]

Should be:

Params: map[username:Altonymous password: confirm_password: handle:Altonymous]

@xntrik
Copy link

xntrik commented Feb 19, 2016

Hi @Altonymous and @hoisie - I've done a slight modification to server.go to provide a config attribute called OmitPostParams, which if set to true does NOT omit any POST parameters.

Is there interest in this getting patched in? If so I'll submit a pull request.

Usage is pretty simple:
web.Config.OmitPostParams = true

Results in output like:
2016/02/19 14:56:26 1.2.3.4 - POST /saml_consume - 27.903774ms

@hoisie
Copy link
Owner

hoisie commented Aug 8, 2016

Thanks for posting this issue. I agree it's a security concern and needs to be fixed. I like the idea of having a way to disable param logging, but I think that could be achieved more effectively using log levels.

I was thinking of introducing a config option like Config.FilterParams which could be a list of sensitive param names. For example, if you'd like to filter out password and password_confirm, you could just use: Config.FilterParams = []string{"password", "password_confirm"}

@xntrik
Copy link

xntrik commented Aug 8, 2016

Great idea!

@hoisie
Copy link
Owner

hoisie commented Aug 11, 2016

Just created #208. Config.FilterParams is a list of regular expression strings. I think that's a little more flexible than just hardcoding param names. Anyone want to take a look at that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants