From 1da6ef52c44fd38785391d3a94af8e969344bc12 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sat, 8 Aug 2009 20:52:33 +0000 Subject: #485974 by pwolanin, Damien Tournoud, mr.baileys: Improved security by limiting the number of allowed login attempts. --- modules/system/system.install | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'modules/system/system.install') diff --git a/modules/system/system.install b/modules/system/system.install index 46ded8dbf..77c566bed 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -759,8 +759,8 @@ function system_schema() { 'not null' => TRUE, 'default' => '', ), - 'hostname' => array( - 'description' => 'Hostname of the visitor.', + 'identifier' => array( + 'description' => 'Identifier of the visitor, such as an IP address or hostname.', 'type' => 'varchar', 'length' => 128, 'not null' => TRUE, @@ -775,7 +775,7 @@ function system_schema() { ), 'primary key' => array('fid'), 'indexes' => array( - 'allow' => array('event', 'hostname', 'timestamp'), + 'allow' => array('event', 'identifier', 'timestamp'), ), ); @@ -2233,6 +2233,17 @@ function system_update_7031() { return $ret; } +/** +* Alter field hostname to identifier in the {flood} table. + */ +function system_update_7032() { + $ret = array(); + db_drop_index($ret, 'flood', 'allow'); + db_change_field($ret, 'flood', 'hostname', 'identifier', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '')); + db_add_index($ret, 'flood', 'allow', array('event', 'identifier', 'timestamp')); + return $ret; +} + /** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. -- cgit v1.2.3