summaryrefslogtreecommitdiff
path: root/util/updates/update_2.24.sql
diff options
context:
space:
mode:
Diffstat (limited to 'util/updates/update_2.24.sql')
-rw-r--r--util/updates/update_2.24.sql6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/updates/update_2.24.sql b/util/updates/update_2.24.sql
new file mode 100644
index 00000000..04d946f1
--- /dev/null
+++ b/util/updates/update_2.24.sql
@@ -0,0 +1,6 @@
+-- Session tokens are stored in the database as a SHA-1 on the actual token
+-- now. Note that this query should be executed only once, otherwise any
+-- existing sessions will be invalidated.
+-- CREATE EXTENSION pgcrypto;
+UPDATE sessions SET token = digest(token, 'sha1');
+-- DROP EXTENSION pgcrypto;