liquid_feedback_core
diff core.sql @ 574:2cb4a7d9e6e9
Bugfix in "expired_token" view: added missing qualifier to avoid authorization codes to be deleted when used
author | jbe |
---|---|
date | Mon Oct 02 19:38:04 2017 +0200 (2017-10-02) |
parents | ed3c3d8bd16b |
children | 8771e783d898 |
line diff
1.1 --- a/core.sql Fri Sep 29 22:36:20 2017 +0200 1.2 +++ b/core.sql Mon Oct 02 19:38:04 2017 +0200 1.3 @@ -6,7 +6,7 @@ 1.4 CREATE EXTENSION IF NOT EXISTS latlon; -- load pgLatLon extenstion 1.5 1.6 CREATE VIEW "liquid_feedback_version" AS 1.7 - SELECT * FROM (VALUES ('4.0.0', 4, 0, 0)) 1.8 + SELECT * FROM (VALUES ('4.0-dev', 4, 0, -1)) 1.9 AS "subquery"("string", "major", "minor", "revision"); 1.10 1.11 1.12 @@ -3633,7 +3633,7 @@ 1.13 SELECT * FROM "token" WHERE now() > "expiry" AND NOT ( 1.14 "token_type" = 'authorization' AND "used" AND EXISTS ( 1.15 SELECT NULL FROM "token" AS "other" 1.16 - WHERE "other"."authorization_token_id" = "id" ) ); 1.17 + WHERE "other"."authorization_token_id" = "token"."id" ) ); 1.18 1.19 CREATE RULE "delete" AS ON DELETE TO "expired_token" DO INSTEAD 1.20 DELETE FROM "token" WHERE "id" = OLD."id";