summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJan-Philipp Litza <janphilipp@litza.de>2012-12-12 02:31:54 +0100
committerJan-Philipp Litza <janphilipp@litza.de>2012-12-12 02:40:12 +0100
commitdb95fe6485f13c0041bbafbb0004b171cd9122e7 (patch)
treef5dbbc05f7ad6490dfe9586a5f3d4304ab537204 /db
parent697b756c4ea5925ebb23e31b08ff851d024ae26d (diff)
new authentication framework with stronger passwords and real salts - please proofread!
Diffstat (limited to 'db')
-rw-r--r--db/update.d/19_password_field.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/db/update.d/19_password_field.php b/db/update.d/19_password_field.php
new file mode 100644
index 00000000..85333f28
--- /dev/null
+++ b/db/update.d/19_password_field.php
@@ -0,0 +1,7 @@
+<?php
+// make the Passwort column in the User table longer to store more advanced hashes with salts
+$res = sql_select("DESCRIBE `User` `Passwort`");
+if ($res[0]['Type'] == 'varchar(40)') {
+ sql_query("ALTER TABLE `User` CHANGE `Passwort` `Passwort` VARCHAR(128) NULL");
+ $applied = true;
+}