-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove bluemonday #1
Conversation
github.com/nullrocks/identicon v0.0.0-20180626043057-7875f45b0022 | ||
github.com/pkg/errors v0.9.1 |
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.
this appeared when running go mod tidy
- seems some of the oauth changes brought it in
ID: userID, | ||
Name: userID, | ||
Picture: fmt.Sprintf(c.URL+"/avatar?user=%s", userID), |
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.
vulnerability fixed: backslashes and double quotes in userID
were not being escaped here
Site: r.URL.Query().Get("site"), | ||
User: safeHTML(user), | ||
Address: safeHTML(address), | ||
Token: template.HTMLEscapeString(tkn), | ||
Site: template.HTMLEscapeString(site), |
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.
vulnerability fixed: site
comes from a URL parameter and was not being HTML escaped at all. Token is less of an issue, but I added HTML escaping just-in-case. The user and address also had some "prettifying" and truncation logic (presumably for plain-text viewing), which I have preserved in safeHTML
, though I don't really see the point.
Audience: e.sanitize(r.URL.Query().Get("site")), | ||
Audience: site, |
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.
this was incorrectly being HTML encoded, but never appears in any HTML document
This was previously used:
site
parameter).Both have been fixed properly here. Fortunately we're not using the email capability at all. Having seen this code makes me super uncomfortable about trusting these authors with anything authentication-related though…