Permalink
Browse files

Fix wild matching bug in Ban Model.

  • Loading branch information...
1 parent 542a27c commit 351ff75c9fe1b3b4e3012f0cdc1b27d56cdbc482 @kaecyra kaecyra committed Mar 14, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 applications/dashboard/models/class.banmodel.php
@@ -164,7 +164,7 @@ public static function CheckUser($User, $Validation = NULL, $UpdateBlocks = FALS
// Convert ban to regex.
$Parts = explode('*', $Ban['BanValue']);
$Parts = array_map('preg_quote', $Parts);
- $Regex = '`'.implode('.*', $Parts).'`i';
+ $Regex = '`^'.implode('.*', $Parts).'$`i';
if (preg_match($Regex, GetValue($Fields[$Ban['BanType']], $User))) {
$Banned[$Ban['BanType']] = TRUE;

0 comments on commit 351ff75

Please sign in to comment.