From: Vincent Zanotti Date: Mon, 5 May 2008 16:50:49 +0000 (+0200) Subject: Updates database layout to allow SHA1 password during registration. X-Git-Tag: core/1.0.0~204 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=97ae9bd034958446cb93b983606240c846b39dfc;p=platal.git Updates database layout to allow SHA1 password during registration. Disables empty passwords in database (consequence of bug fixed in 4f132669b52532c15eebbdee0a17659b5d6ab178). Signed-off-by: Vincent Zanotti --- diff --git a/upgrade/0.9.17/00_password.sql b/upgrade/0.9.17/00_password.sql new file mode 100644 index 0000000..5057806 --- /dev/null +++ b/upgrade/0.9.17/00_password.sql @@ -0,0 +1,8 @@ +-- Switches to SHA1 password storage for register_pending. +ALTER TABLE register_pending CHANGE COLUMN password password VARCHAR(40) NOT NULL; + +-- Disables MD5(""), SHA1("") and LEFT(SHA1(""), 32) as password. +UPDATE register_pending SET password = "" WHERE password IN ("d41d8cd98f00b204e9800998ecf8427e", "da39a3ee5e6b4b0d3255bfef95601890afd80709", "da39a3ee5e6b4b0d3255bfef95601890"); +UPDATE auth_user_md5 SET password = "" WHERE password IN ("d41d8cd98f00b204e9800998ecf8427e", "da39a3ee5e6b4b0d3255bfef95601890afd80709", "da39a3ee5e6b4b0d3255bfef95601890"); + +-- vim:set syntax=mysql: diff --git a/upgrade/0.9.17/update.sh b/upgrade/0.9.17/update.sh new file mode 100755 index 0000000..f351939 --- /dev/null +++ b/upgrade/0.9.17/update.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +. ../inc/pervasive.sh + +mailman_stop +mailman_templates +mailman_start + + +########################################################### +for sql in *.sql +do + echo -n $sql + $MYSQL x4dat < $sql &>/dev/null || echo -n " ERROR" + echo . +done + +########################################################### +