Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Sanitize user input before searching Airtable #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hashtagchris
Copy link
Contributor

@hashtagchris hashtagchris commented Jun 19, 2020

I don't see a way to bind parameters to a prepared statement ("formula" in Airtable-speak), so we'll have to settle for sanitizing to avoid injections.

A sql-like injection is probably only an issue for Airtable search. For other operations like inserting new records, we don't need to concatenate our code and user text. However for inserts we'll still need to check for script injection that could harm other users - user input like Bail Fund<script>document.location = "https://badsite.com";</script>. We could do that manually for now if we're reviewing every submitted listing before approving and making it visible on the site.

Before

image

After

image

I don't see a way to bind parameters to a prepared statement ("formula" in Airtable-speak), so we'll have to settle for sanitizing.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant