summaryrefslogtreecommitdiffstats
path: root/lib/sql
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2008-09-11 16:42:26 +1000
committerJeremy Kerr <jk@ozlabs.org>2008-09-11 16:42:26 +1000
commita72679a9622db66e828e86377f29c9c0c6574d69 (patch)
treecae300bb42b1806b09f28ae8251c5775778df760 /lib/sql
parent0deabd4014cbc9419d203356786e966c4f803ea3 (diff)
downloadpatchwork-a72679a9622db66e828e86377f29c9c0c6574d69.tar.bz2
patchwork-a72679a9622db66e828e86377f29c9c0c6574d69.tar.xz
Don't just rely on random for UserPersonConfirmation keys
It looks like we're getting identical keys generated for confirmation keys. Problem has been reported to django, but in the meantime, salt with the user and email details, then sha1 to give the final key. This requires an increase in the field size for key, migration script included. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib/sql')
-rw-r--r--lib/sql/migration/002-extend-userpersonconfirmation-key-length.sql4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sql/migration/002-extend-userpersonconfirmation-key-length.sql b/lib/sql/migration/002-extend-userpersonconfirmation-key-length.sql
new file mode 100644
index 0000000..fa10fba
--- /dev/null
+++ b/lib/sql/migration/002-extend-userpersonconfirmation-key-length.sql
@@ -0,0 +1,4 @@
+BEGIN;
+ALTER TABLE patchwork_userpersonconfirmation
+ ALTER COLUMN key TYPE char(40);
+COMMIT;