mirror of https://github.com/MISP/MISP
Fixed bugs with PostgreSQL in bruteforce and feed models
parent
939c8b4514
commit
4d5f1aaf00
|
@ -42,7 +42,7 @@ class Bruteforce extends AppModel
|
|||
if ($dataSource == 'Database/Mysql') {
|
||||
$sql = 'DELETE FROM bruteforces WHERE `expire` <= "' . $expire . '";';
|
||||
} elseif ($dataSource == 'Database/Postgres') {
|
||||
$sql = 'DELETE FROM bruteforces WHERE expire <= "' . $expire . '";';
|
||||
$sql = 'DELETE FROM bruteforces WHERE expire <= \'' . $expire . '\';';
|
||||
}
|
||||
$this->query($sql);
|
||||
}
|
||||
|
|
|
@ -1187,7 +1187,7 @@ class Feed extends AppModel
|
|||
'recursive' => -1,
|
||||
'fields' => array('id', 'url', 'name'),
|
||||
'contain' => array('RemoteOrg' => array('fields' => array('RemoteOrg.id', 'RemoteOrg.name'))),
|
||||
'conditions' => array('Server.caching_enabled')
|
||||
'conditions' => array('Server.caching_enabled' => 1)
|
||||
));
|
||||
foreach ($servers as $k => $server) {
|
||||
if (!$redis->exists('misp:server_cache:' . $server['Server']['id'])) {
|
||||
|
|
Loading…
Reference in New Issue