summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2011-03-31 03:05:45 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2011-03-31 03:05:45 +1100
commit21c4ed184f7c38c751a3fad21d058c9979bb1853 (patch)
treee90189facce4d0a91f718a32fdfcb0323f4b8707
parent5b841d1e5366892e3203f60c22c12db45d4375e0 (diff)
IP range bans for IPv6
-rw-r--r--inc/functions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php
index c8239785..ed8908cf 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -213,7 +213,7 @@
$query->execute() or error(db_error($query));
if($config['ban_range']) {
- $query = prepare("DELETE FROM `bans` WHERE :ip REGEXP CONCAT('^', REPLACE(REPLACE(`ip`, '.', '\\.'), '*', '[0-9]*'), '$') AND `expires` = :expires LIMIT 1");
+ $query = prepare("DELETE FROM `bans` WHERE :ip REGEXP CONCAT('^', REPLACE(REPLACE(`ip`, '.', '\\.'), '*', '[0-9a-f]*'), '$') AND `expires` = :expires LIMIT 1");
$query->bindValue(':ip', $_SERVER['REMOTE_ADDR']);
$query->bindValue(':expires', $ban['expires'], PDO::PARAM_INT);
$query->execute() or error(db_error($query));