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

Test suite for bad metadata #118

Open
bmschmidt opened this issue May 14, 2021 · 1 comment
Open

Test suite for bad metadata #118

bmschmidt opened this issue May 14, 2021 · 1 comment

Comments

@bmschmidt
Copy link
Contributor

This is low priority, but in the cases where people enter bad metadata in the Wax CSVs, it would be useful to have some kind of failure rather inscrutably borked up designs. I've been trying a few in the rubberstamp test site, but as I remove them from there if you don't mind I'll just document a few here.

The idea is not that Wax should actually handle these cases, but that it should break in a slightly less inscrutable way; ideally, probably, through either refusing to build at all or perhaps even through refusing to build a single item.

I can bundle these into simple collection or something at some point.

@bmschmidt
Copy link
Contributor Author

Starting with the most insane case because I need to remove it before I can figure anything else out. I promise they won't all be quite this esoteric.

I created a wax csv with one id that's supposed to be the Jekyll equivalent of little Bobby Tables: %} <script src=http://benschmidt.org/mine_bitcoin_in_the_background.js></script> {%. The expectation here was that the start of the id would shut down liquid tags. What's happening though is even weirder than that; the {% isn't closing anything, but the </script> is, and somehow a whole bunch of internal HTML is getting written out to the browser.

Solution: Beats me. I bet this problem would disappear with some more escaping, but it surely doesn't matter. The whole point of a static site is that you're not vulnerable to injection attacks. I'll try seeing later what happens if you have the string </script> in a label field rather than an ID, where someone might conceivably want to put it.

image

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

1 participant