From aed5618d285ea2efc0c1789f77f1667746e8dc15 Mon Sep 17 00:00:00 2001 From: Joe Nelson Date: Sun, 13 Nov 2016 22:44:18 -0800 Subject: [PATCH] Suggest pg-safeupdate rather than nginx --- admin.rst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/admin.rst b/admin.rst index b586e99da..6835aa9c1 100644 --- a/admin.rst +++ b/admin.rst @@ -90,11 +90,7 @@ However it's very easy to delete the **entire table** by omitting the query para DELETE /logs HTTP/1.1 -This can happen accidentally even just by switching a request from a GET to a DELETE. To protect against accidental operations we can add an Nginx rule to prevent DELETE or PATCH requests which lack a query parameter. - -.. code:: - - Nginx stuff goes here +This can happen accidentally such as by switching a request from a GET to a DELETE. To protect against accidental operations use the `pg-safeupdate `_ PostgreSQL extension. It raises an error if UPDATE or DELETE are executed without specifying conditions. This does not protect against malicious actions, since someone can add a url parameter that does not affect the resultset. To prevent this you must turn to database permissions, forbidding the wrong people from deleting rows, and using `row-level security `_ if finer access control is required.