diff options
| author | Michael Foster <savetheinternet@tinyboard.org> | 2013-09-07 12:50:32 +1000 |
|---|---|---|
| committer | Michael Foster <savetheinternet@tinyboard.org> | 2013-09-07 12:50:32 +1000 |
| commit | 55dc5cedc338f56268d8e302cdc52e97206543de (patch) | |
| tree | 4fd76fecbb99f90e3197e48364d5d84dd7077551 /inc/filters.php | |
| parent | e9ccc5d72d121859c8a766bd64a87d45d42f62a2 (diff) | |
Steal make_comment_hex() from plainib
Diffstat (limited to 'inc/filters.php')
| -rw-r--r-- | inc/filters.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/filters.php b/inc/filters.php index 212118bf..27b167ea 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -39,7 +39,7 @@ class Filter { continue 3; break; case 'body': - if ($flood_post['posthash'] != md5($post['body_nomarkup'])) + if ($flood_post['posthash'] != make_comment_hex($post['body_nomarkup'])) continue 3; break; case 'file': @@ -216,12 +216,12 @@ function do_filters(array $post) { if ($post['has_file']) { $query = prepare("SELECT * FROM ``flood`` WHERE `ip` = :ip OR `posthash` = :posthash OR `filehash` = :filehash"); $query->bindValue(':ip', $_SERVER['REMOTE_ADDR']); - $query->bindValue(':posthash', md5($post['body_nomarkup'])); + $query->bindValue(':posthash', make_comment_hex($post['body_nomarkup'])); $query->bindValue(':filehash', $post['filehash']); } else { $query = prepare("SELECT * FROM ``flood`` WHERE `ip` = :ip OR `posthash` = :posthash"); $query->bindValue(':ip', $_SERVER['REMOTE_ADDR']); - $query->bindValue(':posthash', md5($post['body_nomarkup'])); + $query->bindValue(':posthash', make_comment_hex($post['body_nomarkup'])); } $query->execute() or error(db_error($query)); $flood_check = $query->fetchAll(PDO::FETCH_ASSOC); |
