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

xss-sanitize 0.3.7 causes downstream tests to fail #24

Open
DanBurton opened this issue Sep 24, 2021 · 4 comments
Open

xss-sanitize 0.3.7 causes downstream tests to fail #24

DanBurton opened this issue Sep 24, 2021 · 4 comments

Comments

@DanBurton
Copy link

Here are snippets of what I observed on the stackage build server. I can try to provide better repro instructions upon request.

yesod-markdown-0.12.6.11

    Yesod.Markdown
      converts Markdown to sanitized HTML FAILED [1]
      converts Markdown to unsanitized HTML

    Failures:

      test/Spec.hs:33:9:
      1) Yesod.Markdown converts Markdown to sanitized HTML
           expected: "<h1 id=\"title\">Title</h1><ul><li>one</li><li>two</li><
li>three</li></ul>\n  alert('xxs');\n"
            but got: "<h1 id=\"title\">Title</h1><ul><li>one</li><li>two</li><
li>three</li></ul>"


markdown-0.1.17.4

      test/main.hs:230:26:
      1) html block xss
           expected: "alert(&quot;evil&quot;)"
            but got: ""
@snoyberg
Copy link
Member

CC @pbrisbin. Apologies for the change here, see #22

@pbrisbin
Copy link
Member

I'm happy to adjust this test to expect the tag and contents are stripped, which I think is what's needed, but I indeed can't repro:

Selected resolver: nightly-2021-09-18
yesod-markdown> test (suite: test)


Yesod.Markdown
  converts Markdown to sanitized HTML
  converts Markdown to unsanitized HTML

Finished in 0.0080 seconds
2 examples, 0 failures

yesod-markdown> Test suite test passed

2021-09-18 seems to be what I get with --resolver nightly; is this behavior in something even newer?

@pbrisbin
Copy link
Member

I updated yesod-markdown-0.12.6.12 to assert in a less brittle way that should pass on either behavior.

@andreasabel
Copy link
Collaborator

Change title? There is no xss-sanitize-0.6.7, at least not on Hackage.

@andreasabel andreasabel changed the title xss-sanitize 0.6.7 causes downstream tests to fail xss-sanitize 0.3.7 causes downstream tests to fail Mar 31, 2022
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

4 participants