Skip to content

Commit

Permalink
Use exact match with IframeAllowlist (#799)
Browse files Browse the repository at this point in the history
  • Loading branch information
DragonRider0o0 authored Nov 9, 2022
1 parent 966d39d commit 6d81f90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion claat/parser/gdoc/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ func image(ds *docState) nodes.Node {
// For iframe, make sure URL ends in allowlisted domain.
ok := false
for _, domain := range nodes.IframeAllowlist {
if strings.HasSuffix(u.Hostname(), domain) {
if u.Hostname() == domain {
ok = true
break
}
Expand Down
2 changes: 1 addition & 1 deletion claat/parser/md/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ func image(ds *docState) nodes.Node {
// For iframe, make sure URL ends in allowlisted domain.
ok := false
for _, domain := range nodes.IframeAllowlist {
if strings.HasSuffix(u.Hostname(), domain) {
if u.Hostname() == domain {
ok = true
break
}
Expand Down

0 comments on commit 6d81f90

Please sign in to comment.