News for hackers. Stuff that matters.
Re:PostgREST – Serve a RESTful API from Any Postgres Database by ruslan_talpa on Thursday December 29, 2022 @12:32PM (#34175232)
Because queries like this will kill any db, and you don’t need any privileges

SELECT crypt( encode(digest(gen_random_bytes(1024), 'sha512'), 'base64'), gen_salt('bf', 20) )FROM generate_series(1, 1000000)

More explanations here https://www.freecodecamp.org/news/stop-calling-postgrest-mag...

Re:PostgREST – Serve a RESTful API from Any Postgres Database by RhodesianHunter on Thursday December 29, 2022 @12:41PM (#34175374)
Wouldn't it be much easier to disable/restrict certain sql functions than do all of the http->sql mapping?
Re:PostgREST – Serve a RESTful API from Any Postgres Database by 411111111111111 on Thursday December 29, 2022 @01:07PM (#34175732)
No, as there are countless ways to do the same. Whitelisting is more effective if your code is running on untrusted devices (frontend)
Re:PostgREST – Serve a RESTful API from Any Postgres Database by miga on Saturday December 31, 2022 @02:17PM (#34199691)
Postgres can limit queries to only given number of milliseconds.
Re:PostgREST – Serve a RESTful API from Any Postgres Database by ruslan_talpa on Monday January 02, 2023 @03:26PM (#34223180)
Give me access to your PG with a user that has no privileges, can not run queries longer then X ms and see how easy it would be to DOS the db :)