mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-23 23:20:57 +01:00
don't use CRC32
This commit is contained in:
parent
f535bbe59e
commit
931c2d679e
@ -190,7 +190,7 @@ function _create_antibot($board, $thread) {
|
||||
$query->bindValue(':expires', $config['spam']['hidden_inputs_expire']);
|
||||
$query->execute() or error(db_error($query));
|
||||
|
||||
$query = prepare('INSERT INTO `antispam` VALUES (:board, :thread, CRC32(:hash), UNIX_TIMESTAMP(), NULL, 0)');
|
||||
$query = prepare('INSERT INTO `antispam` VALUES (:board, :thread, :hash, UNIX_TIMESTAMP(), NULL, 0)');
|
||||
$query->bindValue(':board', $board);
|
||||
$query->bindValue(':thread', $thread);
|
||||
$query->bindValue(':hash', $antibot->hash());
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
// Installation/upgrade file
|
||||
define('VERSION', 'v0.9.6-dev-3');
|
||||
define('VERSION', 'v0.9.6-dev-4');
|
||||
|
||||
require 'inc/functions.php';
|
||||
|
||||
@ -208,6 +208,8 @@ if (file_exists($config['has_installed'])) {
|
||||
$query->bindValue(':oldboard', $board['id']);
|
||||
$query->execute() or error(db_error($query));
|
||||
}
|
||||
case 'v0.9.6-dev-3':
|
||||
query("ALTER TABLE `antispam` CHANGE `hash` `hash` CHAR( 40 ) NOT NULL") or error(db_error());
|
||||
case false:
|
||||
// Update version number
|
||||
file_write($config['has_installed'], VERSION);
|
||||
|
@ -29,7 +29,7 @@ SET time_zone = "+00:00";
|
||||
CREATE TABLE IF NOT EXISTS `antispam` (
|
||||
`board` varchar(255) NOT NULL,
|
||||
`thread` int(11) DEFAULT NULL,
|
||||
`hash` bigint(20) NOT NULL,
|
||||
`hash` char(40) NOT NULL,
|
||||
`created` int(11) NOT NULL,
|
||||
`expires` int(11) DEFAULT NULL,
|
||||
`passed` smallint(6) NOT NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user