[vhffs-dev] [849] bye vhffs_boxes.password_hash, fixes bug around mail password, user of vhffs 4. 1 must apply the change on the db and change their MDA config file |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
- To: vhffs-dev@xxxxxxxxx
- Subject: [vhffs-dev] [849] bye vhffs_boxes.password_hash, fixes bug around mail password, user of vhffs 4. 1 must apply the change on the db and change their MDA config file
- From: subversion@xxxxxxxxx
- Date: Fri, 31 Aug 2007 18:55:59 +0200
Revision: 849
Author: gradator
Date: 2007-08-31 16:55:58 +0000 (Fri, 31 Aug 2007)
Log Message:
-----------
bye vhffs_boxes.password_hash, fixes bug around mail password, user of vhffs 4.1 must apply the change on the db and change their MDA config file
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Services/Mail.pm
trunk/vhffs-backend/src/pgsql/initdb.sql.in
trunk/vhffs-compat/4.0.sql.in
Modified: trunk/vhffs-api/src/Vhffs/Services/Mail.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Mail.pm 2007-08-31 01:14:52 UTC (rev 848)
+++ trunk/vhffs-api/src/Vhffs/Services/Mail.pm 2007-08-31 16:55:58 UTC (rev 849)
@@ -292,15 +292,15 @@
$self->{'boxes'}{$name}{'password'} = $password;
$self->{'boxes'}{$name}{'domain'} = $self->{'domain'};
$self->{boxes}{$name}{domain_hash} = $domainhash;
- $self->{boxes}{$name}{password_hash} = $password;
+ $self->{boxes}{$name}{password} = $password;
$self->{boxes}{$name}{novirus} = 0;
$self->{boxes}{$name}{nospam} = 0;
$self->{boxes}{$name}{mbox_name} = $userhash;
- my $sql = 'INSERT INTO vhffs_boxes(domain, local_part, domain_hash, password_hash, mbox_name, password, nospam, novirus) VALUES(?, ?, ?, ?, ?, \'\', FALSE, FALSE)';
+ my $sql = 'INSERT INTO vhffs_boxes(domain, local_part, domain_hash, password, mbox_name, nospam, novirus) VALUES(?, ?, ?, ?, ?, FALSE, FALSE)';
my $dbh = $self->{db};
my $sth = $dbh->prepare($sql);
- $sth->execute($self->{domain}, $name, $domainhash, $password, $userhash) or return -3;
+ $sth->execute($self->{domain}, $name, $domainhash, $password, $userhash) or return -3;
return 1;
}
@@ -539,8 +539,8 @@
sub fetch_boxes {
my ($dbh, $domain) = @_;
- my $sql = q{SELECT domain, local_part, domain_hash, password_hash,
- mbox_name, password_hash AS password, nospam, novirus FROM vhffs_boxes
+ my $sql = q{SELECT domain, local_part, domain_hash, password,
+ mbox_name, nospam, novirus FROM vhffs_boxes
WHERE domain = ?};
return $dbh->selectall_hashref($sql, 'local_part', undef, $domain);
}
Modified: trunk/vhffs-backend/src/pgsql/initdb.sql.in
===================================================================
--- trunk/vhffs-backend/src/pgsql/initdb.sql.in 2007-08-31 01:14:52 UTC (rev 848)
+++ trunk/vhffs-backend/src/pgsql/initdb.sql.in 2007-08-31 16:55:58 UTC (rev 849)
@@ -95,7 +95,6 @@
domain varchar,
local_part varchar,
domain_hash varchar NOT NULL,
- password_hash varchar NOT NULL,
mbox_name varchar NOT NULL,
password varchar NOT NULL,
nospam boolean,
Modified: trunk/vhffs-compat/4.0.sql.in
===================================================================
--- trunk/vhffs-compat/4.0.sql.in 2007-08-31 01:14:52 UTC (rev 848)
+++ trunk/vhffs-compat/4.0.sql.in 2007-08-31 16:55:58 UTC (rev 849)
@@ -326,3 +326,6 @@
-- main groups of users don't use anymore a stupid state to be hidden from user groups
UPDATE vhffs_object SET state=6 WHERE vhffs_object.state=1 AND vhffs_object.object_id IN (SELECT g.object_id FROM vhffs_groups g, vhffs_users u WHERE u.gid=g.gid);
+-- vhffs_boxes
+ALTER TABLE vhffs_boxes DROP COLUMN password;
+ALTER TABLE vhffs_boxes RENAME COLUMN password_hash TO password;