mastodon / flodgatt

A blazingly fast drop-in replacement for the Mastodon streaming API server
GNU Affero General Public License v3.0
87 stars 7 forks source link

Postgres #137

Closed codesections closed 4 years ago

codesections commented 4 years ago

This PR queries Postgres using simple queries, rather than prepared statements. This allows Flodgatt to work with PG Bouncer, which does not support prepared statements.

One downside to moving away from prepared statements is that prepared statements fully prevent SQL injection attacks; this change gives up that protection and instead relies on sanitizing input. Because our only user-supplied input is alphanumeric, this should be reliable, but I still want to flag it here since prepared statements are generally considered best practice.