Skip to content

Commit

Permalink
update bluemonday to v1.0.5 to fix microcosm-cc/bluemonday#111
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Apr 3, 2021
1 parent 8ef87f4 commit 961b8aa
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
6 changes: 6 additions & 0 deletions backend/app/store/comment_test.go
Expand Up @@ -67,6 +67,12 @@ func TestComment_Sanitize(t *testing.T) {
out: Comment{Text: "blah blah",
Locator: Locator{URL: "/p/2021/03/23/prep-747/#remark42__comment-1b365913-7056-4920-b9ad-01304bdda085"}},
},
{
inp: Comment{Text: "<scrİpt>&lt;img src=x onerror=alert(1)&gt;",
Locator: Locator{URL: "/p/2021/03/23/prep-747/#remark42__comment-1b365913-7056-4920-b9ad-01304bdda085"}},
out: Comment{Text: "&lt;img src=x onerror=alert(1)&gt;",
Locator: Locator{URL: "/p/2021/03/23/prep-747/#remark42__comment-1b365913-7056-4920-b9ad-01304bdda085"}},
},
}

for n, tt := range tbl {
Expand Down
2 changes: 1 addition & 1 deletion backend/go.mod
Expand Up @@ -23,7 +23,7 @@ require (
github.com/gorilla/feeds v1.1.1
github.com/hashicorp/go-multierror v1.1.0
github.com/kyokomi/emoji v2.2.1+incompatible
github.com/microcosm-cc/bluemonday v1.0.4
github.com/microcosm-cc/bluemonday v1.0.5
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
github.com/rs/xid v1.2.1
Expand Down
2 changes: 2 additions & 0 deletions backend/go.sum
Expand Up @@ -179,6 +179,8 @@ github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hd
github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
github.com/microcosm-cc/bluemonday v1.0.4 h1:p0L+CTpo/PLFdkoPcJemLXG+fpMD7pYOoDEq1axMbGg=
github.com/microcosm-cc/bluemonday v1.0.4/go.mod h1:8iwZnFn2CDDNZ0r6UXhF4xawGvzaqzCRa1n3/lO3W2w=
github.com/microcosm-cc/bluemonday v1.0.5 h1:cF59UCKMmmUgqN1baLvqU/B1ZsMori+duLVTLpgiG3w=
github.com/microcosm-cc/bluemonday v1.0.5/go.mod h1:8iwZnFn2CDDNZ0r6UXhF4xawGvzaqzCRa1n3/lO3W2w=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs=
Expand Down
28 changes: 24 additions & 4 deletions backend/vendor/github.com/microcosm-cc/bluemonday/sanitize.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/vendor/modules.txt
Expand Up @@ -168,7 +168,7 @@ github.com/klauspost/compress/zstd/internal/xxhash
# github.com/kyokomi/emoji v2.2.1+incompatible
## explicit
github.com/kyokomi/emoji
# github.com/microcosm-cc/bluemonday v1.0.4
# github.com/microcosm-cc/bluemonday v1.0.5
## explicit
github.com/microcosm-cc/bluemonday
# github.com/nullrocks/identicon v0.0.0-20180626043057-7875f45b0022
Expand Down

0 comments on commit 961b8aa

Please sign in to comment.