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

Go: Add Tainted Path sanitizers #17759

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Kwstubbs
Copy link
Contributor

@Kwstubbs Kwstubbs commented Oct 15, 2024

Add gorilla mux.Vars sanitizer

@Kwstubbs Kwstubbs requested a review from a team as a code owner October 15, 2024 02:52
Copy link
Contributor

@owen-mc owen-mc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for net/url.URL.Path, and mention it in the change note. Also, why do you think that reading that field is a sanitizer? I don't see anything in the docs about what characters it may or may not contain.

@Kwstubbs
Copy link
Contributor Author

Kwstubbs commented Oct 15, 2024

@owen-mc It seems the default mux also sanitizes the path using this function. It seems there are also some changes implemented in version 1.22 from the comments here that I have yet to test (I'm on 1.21). I'll go ahead and remove the net/url.URL.Path sanitizer for now and possibly come back to it.

@Kwstubbs Kwstubbs requested a review from owen-mc October 15, 2024 21:34
Copy link
Contributor

@owen-mc owen-mc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good - just need to add two tests for SkipClean (called with true and false).

@Kwstubbs Kwstubbs requested a review from owen-mc November 13, 2024 00:21
owen-mc
owen-mc previously approved these changes Nov 13, 2024
Copy link
Contributor

@owen-mc owen-mc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Only very minor comments left.

@owen-mc
Copy link
Contributor

owen-mc commented Nov 13, 2024

I think if you're just committing my suggestions it doesn't dismiss my review.

Co-authored-by: Owen Mansel-Chan <[email protected]>
@Kwstubbs
Copy link
Contributor Author

committing suggestions didn't work 😞

@Kwstubbs Kwstubbs requested a review from owen-mc November 13, 2024 22:48
@owen-mc
Copy link
Contributor

owen-mc commented Nov 13, 2024

committing suggestions didn't work 😞

Shows how much I know 😆 .

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

Successfully merging this pull request may close these issues.

2 participants