Merge branch 'hotfix-2.3.65'

pull/516/head v2.3.65
iglocska 2015-05-15 09:25:40 +02:00
commit b604203f2f
3 changed files with 6 additions and 7 deletions

View File

@ -1 +1 @@
{"major":2, "minor":3, "hotfix":64}
{"major":2, "minor":3, "hotfix":65}

View File

@ -170,16 +170,15 @@ class ServersController extends AppController {
}
if (!Configure::read('MISP.background_jobs')) {
$result = $this->Server->pull($this->Auth->user(), $id, $technique, $s);
// error codes
if (is_numeric($result)) {
switch ($result) {
if (isset($result[0]) && is_numeric($result[0])) {
switch ($result[0]) {
case '1' :
$this->Session->setFlash(__('Not authorised. This is either due to an invalid auth key, or due to the sync user not having authentication permissions enabled on the remote server.'));
$this->Session->setFlash(__('Not authorised. This is either due to an invalid auth key, or due to the sync user not having authentication permissions enabled on the remote server. Another reason could be an incorrect sync server setting.'));
$this->redirect(array('action' => 'index'));
break;
case '2' :
$this->Session->setFlash($eventIds);
$this->Session->setFlash($result[1]);
$this->redirect(array('action' => 'index'));
break;
case '3' :

View File

@ -12,7 +12,7 @@ class SyncTool {
$HttpSocket = new HttpSocket($params);
$proxy = Configure::read('Proxy');
$HttpSocket->configProxy($proxy['host'], $proxy['port'], $proxy['method'], $proxy['user'], $proxy['password']);
if ($proxy) $HttpSocket->configProxy($proxy['host'], $proxy['port'], $proxy['method'], $proxy['user'], $proxy['password']);
return $HttpSocket;
}