resolve merge

pull/5974/head
Vito Piserchia 2020-08-16 13:31:31 +02:00
parent c397375634
commit b8c7485712
112 changed files with 611 additions and 580 deletions

View File

@ -107,6 +107,16 @@ if (!$relativePaths) {
} }
} }
/**
* Configure base URL for CakePHP
*/
if (Configure::read('MISP.baseurl')) {
$regex = "%^(?<proto>https?)://(?<host>(?:(?:\w|-)+\.)+[a-z]{2,5})(?::(?<port>[0-9]+))?(?<base>/[a-z0-9_\-\.]+)?$%i";
if (preg_match($regex, Configure::read('MISP.baseurl'), $matches)) {
if (isset($matches['base'])) Configure::write('App.base', $matches['base']);
}
}
/** /**
* Plugins need to be loaded manually, you can either load them one by one or all of them in a single call * Plugins need to be loaded manually, you can either load them one by one or all of them in a single call
* Uncomment one of the lines below, as you need. make sure you read the documentation on CakePlugin to use more * Uncomment one of the lines below, as you need. make sure you read the documentation on CakePlugin to use more

View File

@ -294,7 +294,7 @@ class RestResponseComponent extends Component
$action = substr($action, 6); $action = substr($action, 6);
$admin_routing = 'admin/'; $admin_routing = 'admin/';
} }
$url = '/' . $admin_routing . $controller . '/' . $action; $url = $baseurl . '/' . $admin_routing . $controller . '/' . $action;
$result[$url] = $data; $result[$url] = $data;
} }
} }
@ -337,7 +337,7 @@ class RestResponseComponent extends Component
} }
} }
$data['body'] = json_encode($data['body'], JSON_PRETTY_PRINT); $data['body'] = json_encode($data['body'], JSON_PRETTY_PRINT);
$url = '/' . $admin_routing . $controller . '/' . $action; $url = $baseurl . '/' . $admin_routing . $controller . '/' . $action;
$data['url'] = $url; $data['url'] = $url;
if (!empty($data['params'])) { if (!empty($data['params'])) {
foreach ($data['params'] as $param) { foreach ($data['params'] as $param) {

View File

@ -1529,7 +1529,7 @@ class EventsController extends AppController
} }
$this->set('contributors', $contributors); $this->set('contributors', $contributors);
$this->set('typeGroups', array_keys($this->Event->Attribute->typeGroupings)); $this->set('typeGroups', array_keys($this->Event->Attribute->typeGroupings));
$attributeUri = '/events/viewEventAttributes/' . $event['Event']['id']; $attributeUri = $baseurl . '/events/viewEventAttributes/' . $event['Event']['id'];
foreach ($this->params->named as $k => $v) { foreach ($this->params->named as $k => $v) {
if (!is_numeric($k)) { if (!is_numeric($k)) {
if (is_array($v)) { if (is_array($v)) {
@ -1989,7 +1989,7 @@ class EventsController extends AppController
} else { } else {
if ($this->_isRest()) { // TODO return error if REST if ($this->_isRest()) { // TODO return error if REST
if (is_numeric($add)) { if (is_numeric($add)) {
$this->response->header('Location', Configure::read('MISP.baseurl') . '/events/' . $add); $this->response->header('Location', $baseurl . '/events/' . $add);
$this->response->send(); $this->response->send();
throw new NotFoundException(__('Event already exists, if you would like to edit it, use the url in the location header.')); throw new NotFoundException(__('Event already exists, if you would like to edit it, use the url in the location header.'));
} }
@ -2606,7 +2606,7 @@ class EventsController extends AppController
if (!empty($errors)) { if (!empty($errors)) {
$this->set('errors', $errors); $this->set('errors', $errors);
} }
$this->set('url', '/events/publishSightings/' . $id); $this->set('url', $baseurl . '/events/publishSightings/' . $id);
$this->set('id', $id); $this->set('id', $id);
$this->set('_serialize', array('name', 'message', 'url', 'id', 'errors')); $this->set('_serialize', array('name', 'message', 'url', 'id', 'errors'));
} else { } else {
@ -2673,7 +2673,7 @@ class EventsController extends AppController
if (!empty($errors)) { if (!empty($errors)) {
$this->set('errors', $errors); $this->set('errors', $errors);
} }
$this->set('url', '/events/alert/' . $id); $this->set('url', $baseurl . '/events/alert/' . $id);
$this->set('id', $id); $this->set('id', $id);
$this->set('_serialize', array('name', 'message', 'url', 'id', 'errors')); $this->set('_serialize', array('name', 'message', 'url', 'id', 'errors'));
} else { } else {
@ -2758,7 +2758,7 @@ class EventsController extends AppController
if (!empty($errors)) { if (!empty($errors)) {
$this->set('errors', $errors); $this->set('errors', $errors);
} }
$this->set('url', '/events/alert/' . $id); $this->set('url', $baseurl . '/events/alert/' . $id);
$this->set('id', $id); $this->set('id', $id);
$this->set('_serialize', array('name', 'message', 'url', 'id', 'errors')); $this->set('_serialize', array('name', 'message', 'url', 'id', 'errors'));
} else { } else {
@ -3946,89 +3946,89 @@ class EventsController extends AppController
// #TODO i18n // #TODO i18n
$exports = array( $exports = array(
'xml' => array( 'xml' => array(
'url' => '/events/restSearch/xml/eventid:' . $id . '.xml', 'url' => $baseurl . '/events/restSearch/xml/eventid:' . $id . '.xml',
'text' => 'MISP XML (metadata + all attributes)', 'text' => 'MISP XML (metadata + all attributes)',
'requiresPublished' => false, 'requiresPublished' => false,
'checkbox' => true, 'checkbox' => true,
'checkbox_text' => 'Encode Attachments', 'checkbox_text' => 'Encode Attachments',
'checkbox_set' => '/events/restSearch/xml/eventid:' . $id . '/withAttachments:1.xml', 'checkbox_set' => $baseurl . '/events/restSearch/xml/eventid:' . $id . '/withAttachments:1.xml',
'checkbox_default' => true 'checkbox_default' => true
), ),
'json' => array( 'json' => array(
'url' => '/events/restSearch/json/eventid:' . $id . '.json', 'url' => $baseurl . '/events/restSearch/json/eventid:' . $id . '.json',
'text' => 'MISP JSON (metadata + all attributes)', 'text' => 'MISP JSON (metadata + all attributes)',
'requiresPublished' => false, 'requiresPublished' => false,
'checkbox' => true, 'checkbox' => true,
'checkbox_text' => 'Encode Attachments', 'checkbox_text' => 'Encode Attachments',
'checkbox_set' => '/events/restSearch/json/withAttachments:1/eventid:' . $id . '.json', 'checkbox_set' => $baseurl . '/events/restSearch/json/withAttachments:1/eventid:' . $id . '.json',
'checkbox_default' => true 'checkbox_default' => true
), ),
'openIOC' => array( 'openIOC' => array(
'url' => '/events/restSearch/openioc/to_ids:1/published:1/eventid:' . $id . '.json', 'url' => $baseurl .'/events/restSearch/openioc/to_ids:1/published:1/eventid:' . $id . '.json',
'text' => 'OpenIOC (all indicators marked to IDS)', 'text' => 'OpenIOC (all indicators marked to IDS)',
'requiresPublished' => false, 'requiresPublished' => false,
'checkbox' => false, 'checkbox' => false,
), ),
'csv' => array( 'csv' => array(
'url' => '/events/restSearch/returnFormat:csv/to_ids:1/published:1/includeContext:0/eventid:' . $id, 'url' => $baseurl . '/events/restSearch/returnFormat:csv/to_ids:1/published:1/includeContext:0/eventid:' . $id,
'text' => 'CSV', 'text' => 'CSV',
'requiresPublished' => false, 'requiresPublished' => false,
'checkbox' => true, 'checkbox' => true,
'checkbox_text' => 'Include non-IDS marked attributes', 'checkbox_text' => 'Include non-IDS marked attributes',
'checkbox_set' => '/events/restSearch/returnFormat:csv/to_ids:1||0/published:1||0/includeContext:0/eventid:' . $id 'checkbox_set' => $baseurl . '/events/restSearch/returnFormat:csv/to_ids:1||0/published:1||0/includeContext:0/eventid:' . $id
), ),
'csv_with_context' => array( 'csv_with_context' => array(
'url' => '/events/restSearch/returnFormat:csv/to_ids:1/published:1/includeContext:1/eventid:' . $id, 'url' => $baseurl . '/events/restSearch/returnFormat:csv/to_ids:1/published:1/includeContext:1/eventid:' . $id,
'text' => 'CSV with additional context', 'text' => 'CSV with additional context',
'requiresPublished' => false, 'requiresPublished' => false,
'checkbox' => true, 'checkbox' => true,
'checkbox_text' => 'Include non-IDS marked attributes', 'checkbox_text' => 'Include non-IDS marked attributes',
'checkbox_set' => '/events/restSearch/returnFormat:csv/to_ids:1||0/published:1||0/includeContext:1/eventid:' . $id 'checkbox_set' => $baseurl . '/events/restSearch/returnFormat:csv/to_ids:1||0/published:1||0/includeContext:1/eventid:' . $id
), ),
'stix_xml' => array( 'stix_xml' => array(
'url' => '/events/restSearch/stix/eventid:' . $id, 'url' => $baseurl . '/events/restSearch/stix/eventid:' . $id,
'text' => 'STIX XML (metadata + all attributes)', 'text' => 'STIX XML (metadata + all attributes)',
'requiresPublished' => false, 'requiresPublished' => false,
'checkbox' => true, 'checkbox' => true,
'checkbox_text' => 'Encode Attachments', 'checkbox_text' => 'Encode Attachments',
'checkbox_set' => '/events/restSearch/stix/eventid:' . $id . '/withAttachments:1' 'checkbox_set' => $baseurl . '/events/restSearch/stix/eventid:' . $id . '/withAttachments:1'
), ),
'stix_json' => array( 'stix_json' => array(
'url' => '/events/restSearch/stix-json/eventid:' . $id, 'url' => $baseurl . '/events/restSearch/stix-json/eventid:' . $id,
'text' => 'STIX JSON (metadata + all attributes)', 'text' => 'STIX JSON (metadata + all attributes)',
'requiresPublished' => false, 'requiresPublished' => false,
'checkbox' => true, 'checkbox' => true,
'checkbox_text' => 'Encode Attachments', 'checkbox_text' => 'Encode Attachments',
'checkbox_set' => '/events/restSearch/stix-json/withAttachments:1/eventid:' . $id 'checkbox_set' => $baseurl . '/events/restSearch/stix-json/withAttachments:1/eventid:' . $id
), ),
'stix2_json' => array( 'stix2_json' => array(
'url' => '/events/restSearch/stix2/eventid:' . $id, 'url' => $baseurl . '/events/restSearch/stix2/eventid:' . $id,
'text' => 'STIX2 (requires the STIX 2 library)', 'text' => 'STIX2 (requires the STIX 2 library)',
'requiresPublished' => false, 'requiresPublished' => false,
'checkbox' => true, 'checkbox' => true,
'checkbox_text' => 'Encode Attachments', 'checkbox_text' => 'Encode Attachments',
'checkbox_set' => '/events/restSearch/stix2/eventid:' . $id . '/withAttachments:1' 'checkbox_set' => $baseurl . '/events/restSearch/stix2/eventid:' . $id . '/withAttachments:1'
), ),
'rpz' => array( 'rpz' => array(
'url' => '/attributes/restSearch/returnFormat:rpz/published:1||0/eventid:' . $id, 'url' => $baseurl . '/attributes/restSearch/returnFormat:rpz/published:1||0/eventid:' . $id,
'text' => 'RPZ Zone file', 'text' => 'RPZ Zone file',
'requiresPublished' => false, 'requiresPublished' => false,
'checkbox' => false, 'checkbox' => false,
), ),
'suricata' => array( 'suricata' => array(
'url' => '/events/restSearch/returnFormat:suricata/published:1||0/eventid:' . $id, 'url' => $baseurl . '/events/restSearch/returnFormat:suricata/published:1||0/eventid:' . $id,
'text' => 'Download Suricata rules', 'text' => 'Download Suricata rules',
'requiresPublished' => false, 'requiresPublished' => false,
'checkbox' => false, 'checkbox' => false,
), ),
'snort' => array( 'snort' => array(
'url' => '/events/restSearch/returnFormat:snort/published:1||0/eventid:' . $id, 'url' => $baseurl . '/events/restSearch/returnFormat:snort/published:1||0/eventid:' . $id,
'text' => 'Download Snort rules', 'text' => 'Download Snort rules',
'requiresPublished' => false, 'requiresPublished' => false,
'checkbox' => false, 'checkbox' => false,
), ),
'bro' => array( 'bro' => array(
'url' => '/attributes/bro/download/all/false/' . $id, 'url' => $baseurl . '/attributes/bro/download/all/false/' . $id,
// 'url' => '/attributes/restSearch/returnFormat:bro/published:1||0/eventid:' . $id, // 'url' => '/attributes/restSearch/returnFormat:bro/published:1||0/eventid:' . $id,
'text' => 'Download Bro rules', 'text' => 'Download Bro rules',
'requiresPublished' => false, 'requiresPublished' => false,
@ -4036,11 +4036,11 @@ class EventsController extends AppController
), ),
'text' => array( 'text' => array(
'text' => 'Export all attribute values as a text file', 'text' => 'Export all attribute values as a text file',
'url' => '/attributes/restSearch/returnFormat:text/published:1||0/eventid:' . $id, 'url' => $baseurl . '/attributes/restSearch/returnFormat:text/published:1||0/eventid:' . $id,
'requiresPublished' => false, 'requiresPublished' => false,
'checkbox' => true, 'checkbox' => true,
'checkbox_text' => 'Include non-IDS marked attributes', 'checkbox_text' => 'Include non-IDS marked attributes',
'checkbox_set' => '/attributes/restSearch/returnFormat:text/published:1||0/to_ids:1||0/eventid:' . $id 'checkbox_set' => $baseurl . '/attributes/restSearch/returnFormat:text/published:1||0/to_ids:1||0/eventid:' . $id
), ),
); );
if ($event['Event']['published'] == 0) { if ($event['Event']['published'] == 0) {
@ -4050,7 +4050,7 @@ class EventsController extends AppController
} }
} }
$exports['csv'] = array( $exports['csv'] = array(
'url' => '/events/restSearch/returnFormat:csv/includeContext:0/eventid:' . $id, 'url' => $baseurl . '/events/restSearch/returnFormat:csv/includeContext:0/eventid:' . $id,
'text' => 'CSV (event not published, IDS flag ignored)', 'text' => 'CSV (event not published, IDS flag ignored)',
'requiresPublished' => false, 'requiresPublished' => false,
'checkbox' => false 'checkbox' => false
@ -4061,7 +4061,7 @@ class EventsController extends AppController
if (is_array($modules) && !empty($modules)) { if (is_array($modules) && !empty($modules)) {
foreach ($modules['modules'] as $module) { foreach ($modules['modules'] as $module) {
$exports[$module['name']] = array( $exports[$module['name']] = array(
'url' => '/events/exportModule/' . $module['name'] . '/' . $id, 'url' => $baseurl . '/events/exportModule/' . $module['name'] . '/' . $id,
'text' => Inflector::humanize($module['name']), 'text' => Inflector::humanize($module['name']),
'requiresPublished' => true, 'requiresPublished' => true,
'checkbox' => false, 'checkbox' => false,
@ -4085,29 +4085,31 @@ class EventsController extends AppController
} }
$imports = array( $imports = array(
'freetext' => array( 'freetext' => array(
'url' => '/events/freeTextImport/' . $id, 'url' => $baseurl . '/events/freeTextImport/' . $id,
'text' => __('Freetext Import'), 'text' => __('Freetext Import'),
'ajax' => true, 'ajax' => true,
'target' => 'popover_form' 'target' => 'popover_form'
), ),
'template' => array( 'template' => array(
'url' => '/templates/templateChoices/' . $id, 'url' => $baseurl . '/templates/templateChoices/' . $id,
'text' => __('Populate using a Template'), 'text' => __('Populate using a Template'),
'ajax' => true, 'ajax' => true,
'target' => 'popover_form' 'target' => 'popover_form'
), ),
'OpenIOC' => array( 'OpenIOC' => array(
'url' => '/events/addIOC/' . $id, 'url' => $baseurl . '/events/addIOC/' . $id,
'text' => __('OpenIOC Import'), 'text' => __('OpenIOC Import'),
'url' => $baseurl . '/events/addIOC/' . $id,
'text' => 'OpenIOC Import',
'ajax' => false, 'ajax' => false,
), ),
'ThreatConnect' => array( 'ThreatConnect' => array(
'url' => '/attributes/add_threatconnect/' . $id, 'url' => $baseurl . '/attributes/add_threatconnect/' . $id,
'text' => __('ThreatConnect Import'), 'text' => __('ThreatConnect Import'),
'ajax' => false 'ajax' => false
), ),
'Forensic analysis' => array( 'Forensic analysis' => array(
'url' => '/events/upload_analysis_file/'.$id, 'url' => $baseurl . '/events/upload_analysis_file/'.$id,
'text' => __('(Experimental) Forensic analysis - Mactime'), 'text' => __('(Experimental) Forensic analysis - Mactime'),
'ajax' => false, 'ajax' => false,
) )
@ -4117,7 +4119,7 @@ class EventsController extends AppController
if (is_array($modules) && !empty($modules)) { if (is_array($modules) && !empty($modules)) {
foreach ($modules['modules'] as $k => $module) { foreach ($modules['modules'] as $k => $module) {
$imports[$module['name']] = array( $imports[$module['name']] = array(
'url' => '/events/importModule/' . $module['name'] . '/' . $id, 'url' => $baseurl . '/events/importModule/' . $module['name'] . '/' . $id,
'text' => Inflector::humanize($module['name']), 'text' => Inflector::humanize($module['name']),
'ajax' => false 'ajax' => false
); );
@ -4126,18 +4128,18 @@ class EventsController extends AppController
} else { } else {
$imports = array( $imports = array(
'MISP' => array( 'MISP' => array(
'url' => '/events/add_misp_export', 'url' => $baseurl . '/events/add_misp_export',
'text' => __('MISP standard (recommended exchange format - lossless)'), 'text' => __('MISP standard (recommended exchange format - lossless)'),
'ajax' => false, 'ajax' => false,
'bold' => true 'bold' => true
), ),
'STIX' => array( 'STIX' => array(
'url' => '/events/upload_stix', 'url' => $baseurl . '/events/upload_stix',
'text' => __('STIX 1.1.1 format (lossy)'), 'text' => __('STIX 1.1.1 format (lossy)'),
'ajax' => false, 'ajax' => false,
), ),
'STIX2' => array( 'STIX2' => array(
'url' => '/events/upload_stix/2', 'url' => $baseurl . '/events/upload_stix/2',
'text' => __('STIX 2.0 format (lossy)'), 'text' => __('STIX 2.0 format (lossy)'),
'ajax' => false, 'ajax' => false,
) )
@ -4358,7 +4360,7 @@ class EventsController extends AppController
if ($successCount > 0) { if ($successCount > 0) {
$this->set('name', 'Partial success'); $this->set('name', 'Partial success');
$this->set('message', 'Successfuly saved ' . $successCount . ' sample(s), but some samples could not be saved.'); $this->set('message', 'Successfuly saved ' . $successCount . ' sample(s), but some samples could not be saved.');
$this->set('url', '/events/view/' . $data['settings']['event_id']); $this->set('url', $baseurl . '/events/view/' . $data['settings']['event_id']);
$this->set('id', $data['settings']['event_id']); $this->set('id', $data['settings']['event_id']);
$this->set('_serialize', array('name', 'message', 'url', 'id', 'errors')); $this->set('_serialize', array('name', 'message', 'url', 'id', 'errors'));
} else { } else {
@ -4369,7 +4371,7 @@ class EventsController extends AppController
} else { } else {
$this->set('name', 'Success'); $this->set('name', 'Success');
$this->set('message', 'Success, saved all attributes.'); $this->set('message', 'Success, saved all attributes.');
$this->set('url', '/events/view/' . $data['settings']['event_id']); $this->set('url', $baseurl . '/events/view/' . $data['settings']['event_id']);
$this->set('id', $data['settings']['event_id']); $this->set('id', $data['settings']['event_id']);
$this->set('_serialize', array('name', 'message', 'url', 'id')); $this->set('_serialize', array('name', 'message', 'url', 'id'));
} }

View File

@ -155,14 +155,14 @@ class GalaxiesController extends AppController
$items = array( $items = array(
array( array(
'name' => __('All clusters'), 'name' => __('All clusters'),
'value' => "/galaxies/selectCluster/" . h($target_id) . '/' . h($target_type) . '/0'. '/local:' . $local 'value' => $baseurl . "/galaxies/selectCluster/" . h($target_id) . '/' . h($target_type) . '/0'. '/local:' . $local
) )
); );
foreach ($galaxies as $galaxy) { foreach ($galaxies as $galaxy) {
if (!isset($galaxy['Galaxy']['kill_chain_order'])) { if (!isset($galaxy['Galaxy']['kill_chain_order'])) {
$items[] = array( $items[] = array(
'name' => h($galaxy['Galaxy']['name']), 'name' => h($galaxy['Galaxy']['name']),
'value' => "/galaxies/selectCluster/" . $target_id . '/' . $target_type . '/' . $galaxy['Galaxy']['id'] . '/local:' . $local, 'value' => $baseurl . "/galaxies/selectCluster/" . $target_id . '/' . $target_type . '/' . $galaxy['Galaxy']['id'] . '/local:' . $local,
'template' => array( 'template' => array(
'preIcon' => 'fa-' . $galaxy['Galaxy']['icon'], 'preIcon' => 'fa-' . $galaxy['Galaxy']['icon'],
'name' => $galaxy['Galaxy']['name'], 'name' => $galaxy['Galaxy']['name'],
@ -183,7 +183,7 @@ class GalaxiesController extends AppController
'isMatrix' => true 'isMatrix' => true
); );
if ($galaxy['Galaxy']['id'] == $mitreAttackGalaxyId) { if ($galaxy['Galaxy']['id'] == $mitreAttackGalaxyId) {
$param['img'] = "/img/mitre-attack-icon.ico"; $param['img'] = $baseurl . "/img/mitre-attack-icon.ico";
} }
$items[] = $param; $items[] = $param;
} }
@ -205,12 +205,12 @@ class GalaxiesController extends AppController
$items = array(); $items = array();
$items[] = array( $items[] = array(
'name' => __('All namespaces'), 'name' => __('All namespaces'),
'value' => "/galaxies/selectGalaxy/" . $target_id . '/' . $target_type . '/0' . '/local:' . $local 'value' => $baseurl . "/galaxies/selectGalaxy/" . $target_id . '/' . $target_type . '/0' . '/local:' . $local
); );
foreach ($namespaces as $namespace) { foreach ($namespaces as $namespace) {
$items[] = array( $items[] = array(
'name' => $namespace, 'name' => $namespace,
'value' => "/galaxies/selectGalaxy/" . $target_id . '/' . $target_type . '/' . $namespace . '/local:' . $local 'value' => $baseurl . "/galaxies/selectGalaxy/" . $target_id . '/' . $target_type . '/' . $namespace . '/local:' . $local
); );
} }

View File

@ -29,12 +29,12 @@ class ObjectTemplatesController extends AppController
$items = array(); $items = array();
$items[] = array( $items[] = array(
'name' => __('All Objects'), 'name' => __('All Objects'),
'value' => "/ObjectTemplates/objectChoice/" . h($event_id) . "/" . "0" 'value' => $baseurl . "/ObjectTemplates/objectChoice/" . h($event_id) . "/" . "0"
); );
foreach($metas as $meta) { foreach($metas as $meta) {
$items[] = array( $items[] = array(
'name' => $meta, 'name' => $meta,
'value' => "/ObjectTemplates/objectChoice/" . h($event_id) . "/" . h($meta) 'value' => $baseurl . "/ObjectTemplates/objectChoice/" . h($event_id) . "/" . h($meta)
); );
} }

View File

@ -1745,7 +1745,7 @@ class ServersController extends AppController
'recommendBackup' => false, 'recommendBackup' => false,
'exitOnError' => false, 'exitOnError' => false,
'requirements' => '', 'requirements' => '',
'url' => '/' 'url' => $baseurl . '/'
); );
foreach($actions as $id => $action) { foreach($actions as $id => $action) {
foreach($default_fields as $field => $value) { foreach($default_fields as $field => $value) {

View File

@ -171,7 +171,7 @@ class ShadowAttributesController extends AppController
$response['check_publish'] = true; $response['check_publish'] = true;
$this->set('name', $response['success']); $this->set('name', $response['success']);
$this->set('message', $response['success']); $this->set('message', $response['success']);
$this->set('url', '/shadow_attributes/accept/' . $id); $this->set('url', $baseurl . '/shadow_attributes/accept/' . $id);
$this->set('_serialize', array('name', 'message', 'url')); $this->set('_serialize', array('name', 'message', 'url'));
} else { } else {
throw new MethodNotAllowedException($response['errors']); throw new MethodNotAllowedException($response['errors']);
@ -223,7 +223,7 @@ class ShadowAttributesController extends AppController
if ($this->_isRest()) { if ($this->_isRest()) {
$this->set('name', 'Proposal discarded.'); $this->set('name', 'Proposal discarded.');
$this->set('message', 'Proposal discarded.'); $this->set('message', 'Proposal discarded.');
$this->set('url', '/shadow_attributes/discard/' . $id); $this->set('url', $baseurl . '/shadow_attributes/discard/' . $id);
$this->set('_serialize', array('name', 'message', 'url')); $this->set('_serialize', array('name', 'message', 'url'));
} else { } else {
$this->autoRender = false; $this->autoRender = false;
@ -865,7 +865,7 @@ class ShadowAttributesController extends AppController
$conditions['AND'][] = array( $conditions['AND'][] = array(
'ShadowAttribute.deleted' => $this->request['named']['deleted'] 'ShadowAttribute.deleted' => $this->request['named']['deleted']
); );
} }
if (!empty($this->request['named']['timestamp'])) { if (!empty($this->request['named']['timestamp'])) {
$conditions['AND'][] = array( $conditions['AND'][] = array(
'ShadowAttribute.timestamp >=' => $this->request['named']['timestamp'] 'ShadowAttribute.timestamp >=' => $this->request['named']['timestamp']

View File

@ -364,7 +364,7 @@ class TagsController extends AppController
if ($this->_isRest()) { if ($this->_isRest()) {
$this->set('name', 'Tag deleted.'); $this->set('name', 'Tag deleted.');
$this->set('message', 'Tag deleted.'); $this->set('message', 'Tag deleted.');
$this->set('url', '/tags/delete/' . $id); $this->set('url', $baseurl . '/tags/delete/' . $id);
$this->set('_serialize', array('name', 'message', 'url')); $this->set('_serialize', array('name', 'message', 'url'));
} }
$this->Flash->success(__('Tag deleted')); $this->Flash->success(__('Tag deleted'));
@ -574,22 +574,22 @@ class TagsController extends AppController
if ($favourites) { if ($favourites) {
$items[] = array( $items[] = array(
'name' => __('Favourite Tags'), 'name' => __('Favourite Tags'),
'value' => "/tags/selectTag/" . h($id) . "/favourites/" . h($scope) . $localFlag 'value' => $baseurl . "/tags/selectTag/" . h($id) . "/favourites/" . h($scope) . $localFlag
); );
} }
if ($scope !== 'tag_collection') { if ($scope !== 'tag_collection') {
$items[] = array( $items[] = array(
'name' => __('Tag Collections'), 'name' => __('Tag Collections'),
'value' => "/tags/selectTag/" . h($id) . "/collections/" . h($scope) . $localFlag 'value' => $baseurl . "/tags/selectTag/" . h($id) . "/collections/" . h($scope) . $localFlag
); );
} }
$items[] = array( $items[] = array(
'name' => __('Custom Tags'), 'name' => __('Custom Tags'),
'value' => "/tags/selectTag/" . h($id) . "/0/" . h($scope) . $localFlag 'value' => $baseurl . "/tags/selectTag/" . h($id) . "/0/" . h($scope) . $localFlag
); );
$items[] = array( $items[] = array(
'name' => __('All Tags'), 'name' => __('All Tags'),
'value' => "/tags/selectTag/" . h($id) . "/all/" . h($scope) . $localFlag 'value' => $baseurl . "/tags/selectTag/" . h($id) . "/all/" . h($scope) . $localFlag
); );
$this->loadModel('Taxonomy'); $this->loadModel('Taxonomy');
@ -597,7 +597,7 @@ class TagsController extends AppController
foreach ($options as $k => $option) { foreach ($options as $k => $option) {
$items[] = array( $items[] = array(
'name' => __('Taxonomy Library') . ":" . h($option), 'name' => __('Taxonomy Library') . ":" . h($option),
'value' => "/tags/selectTag/" . h($id) . "/" . h($k) . "/" . h($scope . $localFlag) 'value' => $baseurl . "/tags/selectTag/" . h($id) . "/" . h($k) . "/" . h($scope . $localFlag)
); );
} }
$this->set('items', $items); $this->set('items', $items);

View File

@ -181,7 +181,7 @@ class Server extends AppModel
'branch' => 1, 'branch' => 1,
'baseurl' => array( 'baseurl' => array(
'level' => 0, 'level' => 0,
'description' => __('The base url of the application (in the format https://www.mymispinstance.com). Several features depend on this setting being correctly set to function.'), 'description' => __('The base url of the application (in the format https://www.mymispinstance.com or https://myserver.com/misp). Several features depend on this setting being correctly set to function.'),
'value' => '', 'value' => '',
'errorMessage' => __('The currenty set baseurl does not match the URL through which you have accessed the page. Disregard this if you are accessing the page via an alternate URL (for example via IP address).'), 'errorMessage' => __('The currenty set baseurl does not match the URL through which you have accessed the page. Disregard this if you are accessing the page via an alternate URL (for example via IP address).'),
'test' => 'testBaseURL', 'test' => 'testBaseURL',
@ -3568,7 +3568,10 @@ class Server extends AppModel
if ($this->testForEmpty($value) !== true) { if ($this->testForEmpty($value) !== true) {
return $this->testForEmpty($value); return $this->testForEmpty($value);
} }
if ($value != strtolower($this->getProto()) . '://' . $this->getHost()) { $regex = "%^(?<proto>https?)://(?<host>(?:(?:\w|-)+\.)+[a-z]{2,5})(?::(?<port>[0-9]+))?(?<base>/[a-z0-9_\-\.]+)?$%i";
if ( !preg_match($regex, $value, $matches)
|| strtolower($matches['proto']) != strtolower($this->getProto())
|| strtolower($matches['host']) != strtolower($this->getHost()) ) {
return 'Invalid baseurl, it has to be in the "https://FQDN" format.'; return 'Invalid baseurl, it has to be in the "https://FQDN" format.';
} }
return true; return true;

View File

@ -1,5 +1,5 @@
<?php <?php
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_category_form', 'url' => '/attributes/editField/' . $object['id'])); echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_category_form', 'url' => $baseurl . '/attributes/editField/' . $object['id']));
?> ?>
<div class='inline-input inline-input-container'> <div class='inline-input inline-input-container'>
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div> <div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>

View File

@ -1,5 +1,5 @@
<?php <?php
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_comment_form', 'url' => '/attributes/editField/' . $object['id'])); echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_comment_form', 'url' => $baseurl . '/attributes/editField/' . $object['id']));
?> ?>
<div class='inline-input inline-input-container'> <div class='inline-input inline-input-container'>
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div> <div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>

View File

@ -1,5 +1,5 @@
<?php <?php
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_distribution_form', 'url' => '/attributes/editField/' . $object['id'])); echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_distribution_form', 'url' => $baseurl . '/attributes/editField/' . $object['id']));
?> ?>
<div class='inline-input inline-input-container'> <div class='inline-input inline-input-container'>
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div> <div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>

View File

@ -1,6 +1,6 @@
<div class="attributes"> <div class="attributes">
<?php <?php
echo $this->Form->create('Attribute', array('url' => '/attributes/editSelected/' . $id)); echo $this->Form->create('Attribute', array('url' => $baseurl . '/attributes/editSelected/' . $id));
?> ?>
<fieldset> <fieldset>
<legend><?php echo __('Mass Edit Attributes'); ?></legend> <legend><?php echo __('Mass Edit Attributes'); ?></legend>

View File

@ -1,6 +1,6 @@
<div class="confirmation"> <div class="confirmation">
<?php <?php
echo $this->Form->create('Attribute', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/attributes/editField/' . $object['id'])); echo $this->Form->create('Attribute', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => $baseurl . '/attributes/editField/' . $object['id']));
echo $this->Form->input('to_ids', array( echo $this->Form->input('to_ids', array(
'options' => array(0 => 'No', 1 => 'Yes'), 'options' => array(0 => 'No', 1 => 'Yes'),
'label' => false, 'label' => false,

View File

@ -1,5 +1,5 @@
<?php <?php
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_type_form', 'url' => '/attributes/editField/' . $object['id'])); echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'id' => 'Attribute_' . $object['id'] . '_type_form', 'url' => $baseurl . '/attributes/editField/' . $object['id']));
?> ?>
<div class='inline-input inline-input-container'> <div class='inline-input inline-input-container'>
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div> <div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>

View File

@ -1,6 +1,6 @@
<?php <?php
echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'url' => '/attributes/editField/' . $object['id'], 'id' => 'Attribute_' . $object['id'] . '_value_form', 'default' => false)); echo $this->Form->create('Attribute', array('class' => 'inline-form inline-field-form', 'url' => $baseurl . '/attributes/editField/' . $object['id'], 'id' => 'Attribute_' . $object['id'] . '_value_form', 'default' => false));
?> ?>
<div class='inline-input inline-input-container'> <div class='inline-input inline-input-container'>
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div> <div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>

View File

@ -1,6 +1,6 @@
<div class="confirmation"> <div class="confirmation">
<?php <?php
echo $this->Form->create($model, array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/' . strtolower($model) . 's/removeTag/' . $id . '/' . $tag_id)); echo $this->Form->create($model, array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => $baseurl . '/' . strtolower($model) . 's/removeTag/' . $id . '/' . $tag_id));
$action = "removeObjectTag('" . $model . "', '" . h($id) . "', '" . h($tag_id) . "');"; $action = "removeObjectTag('" . $model . "', '" . h($id) . "', '" . h($tag_id) . "');";
?> ?>
<legend><?php echo __('Remove Tag'); ?></legend> <legend><?php echo __('Remove Tag'); ?></legend>

View File

@ -1,6 +1,6 @@
<div class="confirmation"> <div class="confirmation">
<?php <?php
echo $this->Form->create('Attribute', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/attributes/toggleCorrelation/' . $attribute['Attribute']['id'])); echo $this->Form->create('Attribute', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => $baseurl . '/attributes/toggleCorrelation/' . $attribute['Attribute']['id']));
$extraTitle = ""; $extraTitle = "";
?> ?>
<legend><?php echo __('Toggle Correlation %s ', $attribute['Attribute']['disable_correlation'] ? __('on') : __('off'));?></legend> <legend><?php echo __('Toggle Correlation %s ', $attribute['Attribute']['disable_correlation'] ? __('on') : __('off'));?></legend>

View File

@ -1,6 +1,6 @@
<div class="attribute_replace"> <div class="attribute_replace">
<?php <?php
echo $this->Form->create('Attribute', array('id', 'url' => '/attributes/attributeReplace/' . $event_id)); echo $this->Form->create('Attribute', array('id', 'url' => $baseurl . '/attributes/attributeReplace/' . $event_id));
?> ?>
<fieldset> <fieldset>
<legend><?php echo __('Attribute Replace Tool'); ?></legend> <legend><?php echo __('Attribute Replace Tool'); ?></legend>

View File

@ -503,7 +503,7 @@ function cleanRules(rules) {
function performQuery(rules) { function performQuery(rules) {
var res = cleanRules(rules); var res = cleanRules(rules);
var url = "/events/viewEventAttributes/<?php echo h($event['Event']['id']); ?>"; var url = "<?php echo $baseurl; ?>/events/viewEventAttributes/<?php echo h($event['Event']['id']); ?>";
$.ajax({ $.ajax({
type:"post", type:"post",
url: url, url: url,

View File

@ -338,7 +338,7 @@
<?php <?php
if ($object['distribution'] == 4): if ($object['distribution'] == 4):
?> ?>
<a href="/sharing_groups/view/<?php echo h($object['sharing_group_id']); ?>"><?php echo h($object['SharingGroup']['name']);?></a> <a href="<?php echo $baseurl;?>/sharing_groups/view/<?php echo h($object['sharing_group_id']); ?>"><?php echo h($object['SharingGroup']['name']);?></a>
<?php <?php
else: else:
echo h($shortDist[$object['distribution']]); echo h($shortDist[$object['distribution']]);

View File

@ -107,7 +107,7 @@
if ($object['objectType'] == 0) { if ($object['objectType'] == 0) {
if ($object['distribution'] == 4): if ($object['distribution'] == 4):
?> ?>
<a href="/sharing_groups/view/<?php echo h($object['sharing_group_id']); ?>"><?php echo h($object['SharingGroup']['name']);?></a> <a href="<?php echo $baseurl; ?>/sharing_groups/view/<?php echo h($object['sharing_group_id']); ?>"><?php echo h($object['SharingGroup']['name']);?></a>
<?php <?php
else: else:
echo h($shortDist[$object['distribution']]); echo h($shortDist[$object['distribution']]);

View File

@ -25,7 +25,7 @@
<?php <?php
if ($mayModify): if ($mayModify):
?> ?>
<span class="fa fa-plus-square useCursorPointer" title="<?php echo __('Add reference');?>" role="button" tabindex="0" aria-label="<?php echo __('Add reference');?>" onClick="genericPopup('<?php echo '/objectReferences/add/' . h($object['id']);?>', '#popover_form');"></span> <span class="fa fa-plus-square useCursorPointer" title="<?php echo __('Add reference');?>" role="button" tabindex="0" aria-label="<?php echo __('Add reference');?>" onClick="genericPopup('<?php echo $baseurl . '/objectReferences/add/' . h($object['id']);?>', '#popover_form');"></span>
<?php <?php
endif; endif;
?> ?>

View File

@ -188,7 +188,7 @@
<td class="short action-links"> <td class="short action-links">
<?php <?php
if (($event['Orgc']['id'] == $me['org_id'] && $mayModify) || $isSiteAdmin) { if (($event['Orgc']['id'] == $me['org_id'] && $mayModify) || $isSiteAdmin) {
echo $this->Form->create('Shadow_Attribute', array('id' => 'ShadowAttribute_' . $object['id'] . '_accept', 'url' => '/shadow_attributes/accept/' . $object['id'], 'style' => 'display:none;')); echo $this->Form->create('Shadow_Attribute', array('id' => 'ShadowAttribute_' . $object['id'] . '_accept', 'url' => $baseurl . '/shadow_attributes/accept/' . $object['id'], 'style' => 'display:none;'));
echo $this->Form->end(); echo $this->Form->end();
?> ?>
<span class="icon-ok icon-white useCursorPointer" title="<?php echo __('Accept Proposal');?>" role="button" tabindex="0" aria-label="<?php echo __('Accept proposal');?>" onClick="acceptObject('shadow_attributes', '<?php echo $object['id']; ?>', '<?php echo $event['Event']['id']; ?>');"></span> <span class="icon-ok icon-white useCursorPointer" title="<?php echo __('Accept Proposal');?>" role="button" tabindex="0" aria-label="<?php echo __('Accept proposal');?>" onClick="acceptObject('shadow_attributes', '<?php echo $object['id']; ?>', '<?php echo $event['Event']['id']; ?>');"></span>

View File

@ -74,7 +74,7 @@
<td class="short action-links"> <td class="short action-links">
<?php <?php
if (($event['Orgc']['id'] == $me['org_id'] && $mayModify) || $isSiteAdmin) { if (($event['Orgc']['id'] == $me['org_id'] && $mayModify) || $isSiteAdmin) {
echo $this->Form->create('Shadow_Attribute', array('id' => 'ShadowAttribute_' . $object['id'] . '_accept', 'url' => '/shadow_attributes/accept/' . $object['id'], 'style' => 'display:none;')); echo $this->Form->create('Shadow_Attribute', array('id' => 'ShadowAttribute_' . $object['id'] . '_accept', 'url' => $baseurl . '/shadow_attributes/accept/' . $object['id'], 'style' => 'display:none;'));
echo $this->Form->end(); echo $this->Form->end();
?> ?>
<span class="icon-ok icon-white useCursorPointer" title="<?php echo __('Accept Proposal');?>" role="button" tabindex="0" aria-label="<?php echo __('Accept proposal');?>" onClick="acceptObject('shadow_attributes', '<?php echo $object['id']; ?>', '<?php echo $event['Event']['id']; ?>');"></span> <span class="icon-ok icon-white useCursorPointer" title="<?php echo __('Accept Proposal');?>" role="button" tabindex="0" aria-label="<?php echo __('Accept proposal');?>" onClick="acceptObject('shadow_attributes', '<?php echo $object['id']; ?>', '<?php echo $event['Event']['id']; ?>');"></span>

View File

@ -1,7 +1,7 @@
<td class="shortish"> <td class="shortish">
<span id="sightingForm_<?php echo h($object['id']);?>"> <span id="sightingForm_<?php echo h($object['id']);?>">
<?php <?php
echo $this->Form->create('Sighting', array('id' => 'Sighting_' . $object['id'], 'url' => '/sightings/add/' . $object['id'], 'style' => 'display:none;')); echo $this->Form->create('Sighting', array('id' => 'Sighting_' . $object['id'], 'url' => $baseurl . '/sightings/add/' . $object['id'], 'style' => 'display:none;'));
echo $this->Form->input('type', array('label' => false, 'id' => 'Sighting_' . $object['id'] . '_type')); echo $this->Form->input('type', array('label' => false, 'id' => 'Sighting_' . $object['id'] . '_type'));
echo $this->Form->end(); echo $this->Form->end();
?> ?>

View File

@ -102,7 +102,7 @@
</ul> </ul>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var currentUri = "<?php echo isset($currentUri) ? h($currentUri) : '/feeds/previewEvent/' . h($feed['Feed']['id']) . '/' . h($event['Event']['uuid']); ?>"; var currentUri = "<?php echo isset($currentUri) ? h($currentUri) : $baseurl . '/feeds/previewEvent/' . h($feed['Feed']['id']) . '/' . h($event['Event']['uuid']); ?>";
var lastSelected = false; var lastSelected = false;
var deleted = <?php echo (isset($deleted) && $deleted) ? 'true' : 'false';?>; var deleted = <?php echo (isset($deleted) && $deleted) ? 'true' : 'false';?>;
$(document).ready(function() { $(document).ready(function() {

View File

@ -102,7 +102,7 @@
</ul> </ul>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var currentUri = "<?php echo isset($currentUri) ? h($currentUri) : '/servers/previewEvent/' . h($server['Server']['id']) . '/' . h($event['Event']['id']); ?>"; var currentUri = "<?php echo isset($currentUri) ? h($currentUri) : $baseurl . '/servers/previewEvent/' . h($server['Server']['id']) . '/' . h($event['Event']['id']); ?>";
var lastSelected = false; var lastSelected = false;
var deleted = <?php echo (isset($deleted) && $deleted) ? 'true' : 'false';?>; var deleted = <?php echo (isset($deleted) && $deleted) ? 'true' : 'false';?>;
$(document).ready(function() { $(document).ready(function() {

View File

@ -32,7 +32,7 @@
<?php echo h($user['User']['id']); ?>&nbsp; <?php echo h($user['User']['id']); ?>&nbsp;
</td> </td>
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';"> <td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
<a href="/organisations/view/<?php echo $user['Organisation']['id'];?>"><?php echo h($user['Organisation']['name']); ?>&nbsp;</a> <a href="<?php echo $baseurl; ?>/organisations/view/<?php echo $user['Organisation']['id'];?>"><?php echo h($user['Organisation']['name']); ?>&nbsp;</a>
</td> </td>
<td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';"> <td class="short" ondblclick="document.location ='<?php echo $this->Html->url(array('admin' => true, 'action' => 'view', $user['User']['id']), true);?>';">
<?php echo $this->Html->link($user['Role']['name'], array('controller' => 'roles', 'action' => 'view', $user['Role']['id'])); ?> <?php echo $this->Html->link($user['Role']['name'], array('controller' => 'roles', 'action' => 'view', $user['Role']['id'])); ?>

View File

@ -74,7 +74,7 @@
<br /> <br />
<div id="edit_object_div"> <div id="edit_object_div">
<?php <?php
$deleteSelectedUrl = '/attributes/deleteSelected/' . $event['Event']['id']; $deleteSelectedUrl = $baseurl . '/attributes/deleteSelected/' . $event['Event']['id'];
if (empty($event['Event']['publish_timestamp'])) { if (empty($event['Event']['publish_timestamp'])) {
$deleteSelectedUrl .= '/1'; $deleteSelectedUrl .= '/1';
} }
@ -88,7 +88,7 @@
echo $this->Form->end(); echo $this->Form->end();
?> ?>
<?php <?php
echo $this->Form->create('ShadowAttribute', array('id' => 'accept_selected', 'url' => '/shadow_attributes/acceptSelected/' . $event['Event']['id'])); echo $this->Form->create('ShadowAttribute', array('id' => 'accept_selected', 'url' => $baseurl . '/shadow_attributes/acceptSelected/' . $event['Event']['id']));
echo $this->Form->input('ids_accept', array( echo $this->Form->input('ids_accept', array(
'type' => 'text', 'type' => 'text',
'value' => '', 'value' => '',
@ -98,7 +98,7 @@
echo $this->Form->end(); echo $this->Form->end();
?> ?>
<?php <?php
echo $this->Form->create('ShadowAttribute', array('id' => 'discard_selected', 'url' => '/shadow_attributes/discardSelected/' . $event['Event']['id'])); echo $this->Form->create('ShadowAttribute', array('id' => 'discard_selected', 'url' => $baseurl . '/shadow_attributes/discardSelected/' . $event['Event']['id']));
echo $this->Form->input('ids_discard', array( echo $this->Form->input('ids_discard', array(
'type' => 'text', 'type' => 'text',
'value' => '', 'value' => '',
@ -259,7 +259,7 @@ attributes or the appropriate distribution level. If you think there is a mistak
</ul> </ul>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var currentUri = "<?php echo isset($currentUri) ? h($currentUri) : '/events/viewEventAttributes/' . h($event['Event']['id']); ?>"; var currentUri = "<?php echo isset($currentUri) ? h($currentUri) : $baseurl . '/events/viewEventAttributes/' . h($event['Event']['id']); ?>";
var currentPopover = ""; var currentPopover = "";
var ajaxResults = {"hover": [], "persistent": []}; var ajaxResults = {"hover": [], "persistent": []};
var timer; var timer;

View File

@ -78,7 +78,7 @@
) )
), ),
'class'=>'btn btn-primary', 'class'=>'btn btn-primary',
'url' => '/attributes/add/' . $event['Event']['id'] 'url' => $baseurl . '/attributes/add/' . $event['Event']['id']
)); ));
?> ?>
</td> </td>

View File

@ -132,9 +132,8 @@
<?php endif; ?> <?php endif; ?>
<div class="comment"> <div class="comment">
<?php <?php
if (isset($currentEvent)) $url = '/posts/add/event/' . $currentEvent; if (isset($currentEvent)) $url = $baseurl . '/posts/add/event/' . $currentEvent;
else $url = '/posts/add/thread/' . $thread['Thread']['id']; else $url = $baseurl . '/posts/add/thread/' . $thread['Thread']['id'];
$url = h($url);
echo $this->Form->create('Post', array('url' => $url)); echo $this->Form->create('Post', array('url' => $url));
?> ?>
<fieldset> <fieldset>

File diff suppressed because it is too large Load Diff

View File

@ -12,35 +12,35 @@
'children' => array( 'children' => array(
array( array(
'text' => __('List Events'), 'text' => __('List Events'),
'url' => '/events/index' 'url' => $baseurl . '/events/index'
), ),
array( array(
'text' => __('Add Event'), 'text' => __('Add Event'),
'url' => '/events/add', 'url' => $baseurl . '/events/add',
'requirement' => $isAclAdd 'requirement' => $isAclAdd
), ),
array( array(
'text' => __('List Attributes'), 'text' => __('List Attributes'),
'url' => '/attributes/index' 'url' => $baseurl . '/attributes/index'
), ),
array( array(
'text' => __('Search Attributes'), 'text' => __('Search Attributes'),
'url' => '/attributes/search' 'url' => $baseurl . '/attributes/search'
), ),
array( array(
'text' => __('REST client'), 'text' => __('REST client'),
'url' => '/servers/rest' 'url' => $baseurl . '/servers/rest'
), ),
array( array(
'type' => 'separator' 'type' => 'separator'
), ),
array( array(
'text' => __('View Proposals'), 'text' => __('View Proposals'),
'url' => '/shadow_attributes/index/all:0' 'url' => $baseurl . '/shadow_attributes/index/all:0'
), ),
array( array(
'text' => __('Events with proposals'), 'text' => __('Events with proposals'),
'url' => '/events/proposalEventIndex' 'url' => $baseurl . '/events/proposalEventIndex'
), ),
array( array(
'url' => '/event_delegations/index/context:pending', 'url' => '/event_delegations/index/context:pending',
@ -51,28 +51,28 @@
), ),
array( array(
'text' => __('List Tags'), 'text' => __('List Tags'),
'url' => '/tags/index' 'url' => $baseurl . '/tags/index'
), ),
array( array(
'text' => __('List Tag Collections'), 'text' => __('List Tag Collections'),
'url' => '/tag_collections/index' 'url' => $baseurl . '/tag_collections/index'
), ),
array( array(
'text' => __('Add Tag'), 'text' => __('Add Tag'),
'url' => '/tags/add', 'url' => $baseurl . '/tags/add',
'requirement' => $isAclTagEditor 'requirement' => $isAclTagEditor
), ),
array( array(
'text' => __('List Taxonomies'), 'text' => __('List Taxonomies'),
'url' => '/taxonomies/index' 'url' => $baseurl . '/taxonomies/index'
), ),
array( array(
'text' => __('List Templates'), 'text' => __('List Templates'),
'url' => '/templates/index' 'url' => $baseurl . '/templates/index'
), ),
array( array(
'text' => __('Add Template'), 'text' => __('Add Template'),
'url' => '/templates/add', 'url' => $baseurl . '/templates/add',
'requirement' => $isAclTemplate 'requirement' => $isAclTemplate
), ),
array( array(
@ -80,11 +80,11 @@
), ),
array( array(
'text' => __('Export'), 'text' => __('Export'),
'url' => '/events/export' 'url' => $baseurl . '/events/export'
), ),
array( array(
'text' => __('Automation'), 'text' => __('Automation'),
'url' => '/events/automation', 'url' => $baseurl . '/events/automation',
'requirement' => $isAclAuth 'requirement' => $isAclAuth
) )
) )
@ -92,11 +92,11 @@
array( array(
'type' => 'root', 'type' => 'root',
'text' => __('Galaxies'), 'text' => __('Galaxies'),
'url' => '/galaxies/index', 'url' => $baseurl . '/galaxies/index',
'children' => array( 'children' => array(
array( array(
'text' => __('List Galaxies'), 'text' => __('List Galaxies'),
'url' => '/galaxies/index' 'url' => $baseurl . '/galaxies/index'
) )
) )
), ),
@ -106,85 +106,85 @@
'children' => array( 'children' => array(
array( array(
'text' => __('Import Regexp'), 'text' => __('Import Regexp'),
'url' => '/admin/regexp/index', 'url' => $baseurl . '/admin/regexp/index',
'requirement' => $isAclRegexp 'requirement' => $isAclRegexp
), ),
array( array(
'text' => __('Import Regexp'), 'text' => __('Import Regexp'),
'url' => '/regexp/index', 'url' => $baseurl . '/regexp/index',
'requirement' => !$isAclRegexp 'requirement' => !$isAclRegexp
), ),
array( array(
'text' => __('Signature Whitelist'), 'text' => __('Signature Whitelist'),
'url' => '/admin/whitelists/index', 'url' => $baseurl . '/admin/whitelists/index',
'requirement' => $isAclRegexp 'requirement' => $isAclRegexp
), ),
array( array(
'text' => __('Signature Whitelist'), 'text' => __('Signature Whitelist'),
'url' => '/whitelists/index', 'url' => $baseurl . '/whitelists/index',
'requirement' => !$isAclRegexp 'requirement' => !$isAclRegexp
), ),
array( array(
'text' => __('List Warninglists'), 'text' => __('List Warninglists'),
'url' => '/warninglists/index' 'url' => $baseurl . '/warninglists/index'
), ),
array( array(
'text' => __('List Noticelists'), 'text' => __('List Noticelists'),
'url' => '/noticelists/index' 'url' => $baseurl . '/noticelists/index'
) )
) )
), ),
array( array(
'type' => 'root', 'type' => 'root',
'text' => __('Global Actions'), 'text' => __('Global Actions'),
'url' => '/dashboards', 'url' => $baseurl . '/dashboards',
'children' => array( 'children' => array(
array( array(
'text' => __('News'), 'text' => __('News'),
'url' => '/news' 'url' => $baseurl . '/news'
), ),
array( array(
'text' => __('My Profile'), 'text' => __('My Profile'),
'url' => '/users/view/me' 'url' => $baseurl . '/users/view/me'
), ),
array( array(
'text' => __('My Settings'), 'text' => __('My Settings'),
'url' => '/user_settings/index/user_id:me' 'url' => $baseurl . '/user_settings/index/user_id:me'
), ),
array( array(
'text' => __('Set Setting'), 'text' => __('Set Setting'),
'url' => '/user_settings/setSetting' 'url' => $baseurl . '/user_settings/setSetting'
), ),
array( array(
'text' => __('Dashboard'), 'text' => __('Dashboard'),
'url' => '/dashboards' 'url' => $baseurl . '/dashboards'
), ),
array( array(
'text' => __('Organisations'), 'text' => __('Organisations'),
'url' => '/organisations/index', 'url' => $baseurl . '/organisations/index',
'requirement' => $isAclSharingGroup || empty(Configure::read('Security.hide_organisation_index_from_users')) 'requirement' => $isAclSharingGroup || empty(Configure::read('Security.hide_organisation_index_from_users'))
), ),
array( array(
'text' => __('Role Permissions'), 'text' => __('Role Permissions'),
'url' => '/roles/index' 'url' => $baseurl . '/roles/index'
), ),
array( array(
'type' => 'separator' 'type' => 'separator'
), ),
array( array(
'text' => __('List Object Templates'), 'text' => __('List Object Templates'),
'url' => '/objectTemplates/index' 'url' => $baseurl . '/objectTemplates/index'
), ),
array( array(
'type' => 'separator' 'type' => 'separator'
), ),
array( array(
'text' => __('List Sharing Groups'), 'text' => __('List Sharing Groups'),
'url' => '/sharing_groups/index' 'url' => $baseurl . '/sharing_groups/index'
), ),
array( array(
'text' => __('Add Sharing Group'), 'text' => __('Add Sharing Group'),
'url' => '/sharing_groups/add', 'url' => $baseurl . '/sharing_groups/add',
'requirement' => $isAclSharingGroup 'requirement' => $isAclSharingGroup
), ),
array( array(
@ -192,42 +192,42 @@
), ),
array( array(
'text' => __('Decaying Models Tool'), 'text' => __('Decaying Models Tool'),
'url' => '/decayingModel/decayingTool', 'url' => $baseurl . '/decayingModel/decayingTool',
'requirement' => $isAdmin 'requirement' => $isAdmin
), ),
array( array(
'text' => __('List Decaying Models'), 'text' => __('List Decaying Models'),
'url' => '/decayingModel/index', 'url' => $baseurl . '/decayingModel/index',
), ),
array( array(
'type' => 'separator' 'type' => 'separator'
), ),
array( array(
'text' => __('User Guide'), 'text' => __('User Guide'),
'url' => 'https://www.circl.lu/doc/misp/' 'url' => $baseurl . 'https://www.circl.lu/doc/misp/'
), ),
array( array(
'text' => __('Categories & Types'), 'text' => __('Categories & Types'),
'url' => '/pages/display/doc/categories_and_types' 'url' => $baseurl . '/pages/display/doc/categories_and_types'
), ),
array( array(
'text' => __('Terms & Conditions'), 'text' => __('Terms & Conditions'),
'url' => '/users/terms' 'url' => $baseurl . '/users/terms'
), ),
array( array(
'text' => __('Statistics'), 'text' => __('Statistics'),
'url' => '/users/statistics' 'url' => $baseurl . '/users/statistics'
), ),
array( array(
'type' => 'separator' 'type' => 'separator'
), ),
array( array(
'text' => __('List Discussions'), 'text' => __('List Discussions'),
'url' => '/threads/index' 'url' => $baseurl . '/threads/index'
), ),
array( array(
'text' => __('Start Discussion'), 'text' => __('Start Discussion'),
'url' => '/posts/add' 'url' => $baseurl . '/posts/add'
) )
) )
), ),
@ -238,42 +238,42 @@
'children' => array( 'children' => array(
array( array(
'text' => __('Create Sync Config'), 'text' => __('Create Sync Config'),
'url' => '/servers/createSync', 'url' => $baseurl . '/servers/createSync',
'requirement' => ($isAclSync && !$isSiteAdmin) 'requirement' => ($isAclSync && !$isSiteAdmin)
), ),
array( array(
'text' => __('Import Server Settings'), 'text' => __('Import Server Settings'),
'url' => '/servers/import', 'url' => $baseurl . '/servers/import',
'requirement' => ($isSiteAdmin) 'requirement' => ($isSiteAdmin)
), ),
array( array(
'text' => __('List Servers'), 'text' => __('List Servers'),
'url' => '/servers/index', 'url' => $baseurl . '/servers/index',
'requirement' => ($isAclSync || $isAdmin) 'requirement' => ($isAclSync || $isAdmin)
), ),
array( array(
'text' => __('List Feeds'), 'text' => __('List Feeds'),
'url' => '/feeds/index', 'url' => $baseurl . '/feeds/index',
'requirement' => ($isSiteAdmin || $hostOrgUser) 'requirement' => ($isSiteAdmin || $hostOrgUser)
), ),
array( array(
'text' => __('Search Feed Caches'), 'text' => __('Search Feed Caches'),
'url' => '/feeds/searchCaches', 'url' => $baseurl . '/feeds/searchCaches',
'requirement' => ($isSiteAdmin || $hostOrgUser) 'requirement' => ($isSiteAdmin || $hostOrgUser)
), ),
array( array(
'text' => __('List SightingDB Connections'), 'text' => __('List SightingDB Connections'),
'url' => '/sightingdb/index', 'url' => $baseurl . '/sightingdb/index',
'requirement' => ($isSiteAdmin) 'requirement' => ($isSiteAdmin)
), ),
array( array(
'text' => __('Add SightingDB Connection'), 'text' => __('Add SightingDB Connection'),
'url' => '/sightingdb/add', 'url' => $baseurl . '/sightingdb/add',
'requirement' => ($isSiteAdmin) 'requirement' => ($isSiteAdmin)
), ),
array( array(
'text' => __('List Communities'), 'text' => __('List Communities'),
'url' => '/communities/index', 'url' => $baseurl . '/communities/index',
'requirement' => ($isSiteAdmin) 'requirement' => ($isSiteAdmin)
) )
) )
@ -281,54 +281,54 @@
array( array(
'type' => 'root', 'type' => 'root',
'text' => __('Administration'), 'text' => __('Administration'),
'url' => '/servers/serverSettings', 'url' => $baseurl . '/servers/serverSettings',
'requirement' => ($isAdmin), 'requirement' => ($isAdmin),
'children' => array( 'children' => array(
array( array(
'text' => __('List Users'), 'text' => __('List Users'),
'url' => '/admin/users/index' 'url' => $baseurl . '/admin/users/index'
), ),
array( array(
'text' => __('List User Settings'), 'text' => __('List User Settings'),
'url' => '/user_settings/index/user_id:all' 'url' => $baseurl . '/user_settings/index/user_id:all'
), ),
array( array(
'text' => __('Set User Setting'), 'text' => __('Set User Setting'),
'url' => '/user_settings/setSetting' 'url' => $baseurl . '/user_settings/setSetting'
), ),
array( array(
'text' => __('Add User'), 'text' => __('Add User'),
'url' => '/admin/users/add' 'url' => $baseurl . '/admin/users/add'
), ),
array( array(
'text' => __('Contact Users'), 'text' => __('Contact Users'),
'url' => '/admin/users/email' 'url' => $baseurl . '/admin/users/email'
), ),
array( array(
'text' => __('User Registrations'), 'text' => __('User Registrations'),
'url' => '/users/registrations' 'url' => $baseurl . '/users/registrations'
), ),
array( array(
'type' => 'separator' 'type' => 'separator'
), ),
array( array(
'text' => __('List Organisations'), 'text' => __('List Organisations'),
'url' => '/organisations/index' 'url' => $baseurl . '/organisations/index'
), ),
array( array(
'text' => __('Add Organisations'), 'text' => __('Add Organisations'),
'url' => '/admin/organisations/add' 'url' => $baseurl . '/admin/organisations/add'
), ),
array( array(
'type' => 'separator' 'type' => 'separator'
), ),
array( array(
'text' => __('List Roles'), 'text' => __('List Roles'),
'url' => '/admin/roles/index' 'url' => $baseurl . '/admin/roles/index'
), ),
array( array(
'text' => __('Add Roles'), 'text' => __('Add Roles'),
'url' => '/admin/roles/add', 'url' => $baseurl . '/admin/roles/add',
'requirement' => $isSiteAdmin 'requirement' => $isSiteAdmin
), ),
array( array(
@ -336,7 +336,7 @@
), ),
array( array(
'text' => __('Server Settings & Maintenance'), 'text' => __('Server Settings & Maintenance'),
'url' => '/servers/serverSettings', 'url' => $baseurl . '/servers/serverSettings',
'requirement' => $isSiteAdmin 'requirement' => $isSiteAdmin
), ),
array( array(
@ -345,7 +345,7 @@
), ),
array( array(
'text' => __('Jobs'), 'text' => __('Jobs'),
'url' => '/jobs/index', 'url' => $baseurl . '/jobs/index',
'requirement' => Configure::read('MISP.background_jobs') && $isSiteAdmin 'requirement' => Configure::read('MISP.background_jobs') && $isSiteAdmin
), ),
array( array(
@ -354,12 +354,12 @@
), ),
array( array(
'text' => __('Scheduled Tasks'), 'text' => __('Scheduled Tasks'),
'url' => '/tasks', 'url' => $baseurl . '/tasks',
'requirement' => Configure::read('MISP.background_jobs') && $isSiteAdmin 'requirement' => Configure::read('MISP.background_jobs') && $isSiteAdmin
), ),
array( array(
'text' => __('Event Block Rules'), 'text' => __('Event Block Rules'),
'url' => '/servers/eventBlockRule', 'url' => $baseurl . '/servers/eventBlockRule',
'requirement' => $isSiteAdmin 'requirement' => $isSiteAdmin
), ),
array( array(
@ -368,12 +368,12 @@
), ),
array( array(
'text' => __('Blacklist Event'), 'text' => __('Blacklist Event'),
'url' => '/eventBlacklists/add', 'url' => $baseurl . '/eventBlacklists/add',
'requirement' => Configure::read('MISP.enableEventBlacklisting') !== false && $isSiteAdmin 'requirement' => Configure::read('MISP.enableEventBlacklisting') !== false && $isSiteAdmin
), ),
array( array(
'text' => __('Manage Event Blacklists'), 'text' => __('Manage Event Blacklists'),
'url' => '/eventBlacklists', 'url' => $baseurl . '/eventBlacklists',
'requirement' => Configure::read('MISP.enableEventBlacklisting') !== false && $isSiteAdmin 'requirement' => Configure::read('MISP.enableEventBlacklisting') !== false && $isSiteAdmin
), ),
array( array(
@ -382,12 +382,12 @@
), ),
array( array(
'text' => __('Blacklist Organisation'), 'text' => __('Blacklist Organisation'),
'url' => '/orgBlacklists/add', 'url' => $baseurl . '/orgBlacklists/add',
'requirement' => Configure::read('MISP.enableOrgBlacklisting') !== false && $isSiteAdmin 'requirement' => Configure::read('MISP.enableOrgBlacklisting') !== false && $isSiteAdmin
), ),
array( array(
'text' => __('Manage Org Blacklists'), 'text' => __('Manage Org Blacklists'),
'url' => '/orgBlacklists', 'url' => $baseurl . '/orgBlacklists',
'requirement' => Configure::read('MISP.enableOrgBlacklisting') !== false && $isSiteAdmin 'requirement' => Configure::read('MISP.enableOrgBlacklisting') !== false && $isSiteAdmin
), ),
) )
@ -399,11 +399,11 @@
'children' => array( 'children' => array(
array( array(
'text' => __('List Logs'), 'text' => __('List Logs'),
'url' => '/admin/logs/index' 'url' => $baseurl . '/admin/logs/index'
), ),
array( array(
'text' => __('Search Logs'), 'text' => __('Search Logs'),
'url' => '/admin/logs/search' 'url' => $baseurl . '/admin/logs/search'
) )
) )
) )
@ -425,7 +425,7 @@
), ),
array( array(
'type' => 'root', 'type' => 'root',
'url' => '/dashboards', 'url' => $baseurl . '/dashboards',
'html' => sprintf( 'html' => sprintf(
'<span class="white" title="%s">%s%s&nbsp;&nbsp;&nbsp;%s</span>', '<span class="white" title="%s">%s%s&nbsp;&nbsp;&nbsp;%s</span>',
h($me['email']), h($me['email']),
@ -438,7 +438,7 @@
) )
), ),
array( array(
'url' => '/users/logout', 'url' => $baseurl . '/users/logout',
'text' => __('Log out'), 'text' => __('Log out'),
'requirement' => empty(Configure::read('Plugin.CustomAuth_disable_logout')) 'requirement' => empty(Configure::read('Plugin.CustomAuth_disable_logout'))
) )

View File

@ -479,7 +479,7 @@
$clone.find('strong').text('Synchronization result:'); $clone.find('strong').text('Synchronization result:');
if (job_sent) { if (job_sent) {
$clone.find('#submoduleGitResult') $clone.find('#submoduleGitResult')
.html('> Synchronizing DB with <a href="/jobs/index/" target="_blank">workers</a>...'); .html('> Synchronizing DB with <a href="<?php echo $baseurl . '/jobs/index/'; ?>" target="_blank">workers</a>...');
} else { } else {
$clone.find('#submoduleGitResult') $clone.find('#submoduleGitResult')
.text(sync_result); .text(sync_result);

View File

@ -79,7 +79,7 @@
?> ?>
</table> </table>
<?php <?php
echo $this->Form->create('Server', array('type' => 'file', 'url' => '/servers/uploadFile/' . $k));?> echo $this->Form->create('Server', array('type' => 'file', 'url' => $baseurl . '/servers/uploadFile/' . $k));?>
<fieldset> <fieldset>
<?php <?php
echo $this->Form->hidden('event_id'); echo $this->Form->hidden('event_id');

View File

@ -5,7 +5,7 @@
'children' => array( 'children' => array(
array( array(
'text' => __('Overview'), 'text' => __('Overview'),
'url' => '/servers/serverSettings/', 'url' => $baseurl . '/servers/serverSettings/',
'active' => $active_tab === false 'active' => $active_tab === false
) )
) )
@ -23,12 +23,12 @@
($tab['severity'] == 0) ? ' <i class="fa fa-exclamation-triangle" title="' . __('This tab reports some potential critical misconfigurations.') . '"></i>' : '' ($tab['severity'] == 0) ? ' <i class="fa fa-exclamation-triangle" title="' . __('This tab reports some potential critical misconfigurations.') . '"></i>' : ''
) )
), ),
'url' => '/servers/serverSettings/' . h($k), 'url' => $baseurl . '/servers/serverSettings/' . h($k),
'active' => $k == $active_tab 'active' => $k == $active_tab
); );
} }
$data['children'][0]['children'][] = array( $data['children'][0]['children'][] = array(
'url' => '/servers/serverSettings/diagnostics', 'url' => $baseurl . '/servers/serverSettings/diagnostics',
'html' => sprintf( 'html' => sprintf(
'%s%s', '%s%s',
__('Diagnostics'), __('Diagnostics'),
@ -41,12 +41,12 @@
); );
$data['children'][0]['children'][] = array( $data['children'][0]['children'][] = array(
'url' => '/servers/serverSettings/files', 'url' => $baseurl . '/servers/serverSettings/files',
'text' => __('Manage files'), 'text' => __('Manage files'),
'active' => $active_tab === 'files' 'active' => $active_tab === 'files'
); );
$data['children'][0]['children'][] = array( $data['children'][0]['children'][] = array(
'url' => '/servers/serverSettings/workers', 'url' => $baseurl . '/servers/serverSettings/workers',
'title' => __('Workers'), 'title' => __('Workers'),
'active' => 'workers' == $active_tab, 'active' => 'workers' == $active_tab,
'html' => sprintf( 'html' => sprintf(
@ -61,7 +61,7 @@
'requirement' => !empty($worker_array) 'requirement' => !empty($worker_array)
); );
$data['children'][0]['children'][] = array( $data['children'][0]['children'][] = array(
'url' => '/servers/serverSettings/download', 'url' => $baseurl . '/servers/serverSettings/download',
'title' => __('Download report'), 'title' => __('Download report'),
'html' => '<i class="fa fa-download"></i>' 'html' => '<i class="fa fa-download"></i>'
); );

View File

@ -103,7 +103,7 @@
<td class="actions short" style="<?php echo $style; ?>"> <td class="actions short" style="<?php echo $style; ?>">
<?php <?php
if ($worker_array['controls']) { if ($worker_array['controls']) {
echo $this->Form->postLink('', '/servers/stopWorker/' . h($worker['pid']), array('class' => 'fa fa-trash black' . $icon_modifier, 'title' => __('Stop (if still running) and remove this worker. This will immediately terminate any jobs that are being executed by it.'))); echo $this->Form->postLink('', $baseurl . '/servers/stopWorker/' . h($worker['pid']), array('class' => 'fa fa-trash black' . $icon_modifier, 'title' => __('Stop (if still running) and remove this worker. This will immediately terminate any jobs that are being executed by it.')));
} }
?> ?>
</td> </td>
@ -115,7 +115,7 @@
</table> </table>
<?php <?php
if ($worker_array['controls']) { if ($worker_array['controls']) {
echo $this->Form->create('Server', array('url' => '/servers/startWorker/' . h($type))); echo $this->Form->create('Server', array('url' => $baseurl . '/servers/startWorker/' . h($type)));
echo $this->Form->button(__('Start a worker'), array('class' => 'btn btn-inverse')); echo $this->Form->button(__('Start a worker'), array('class' => 'btn btn-inverse'));
echo $this->Form->end(); echo $this->Form->end();
} }
@ -126,7 +126,7 @@
<?php <?php
if ($worker_array['controls']) { if ($worker_array['controls']) {
echo $this->Form->create('Server', array('url' => '/servers/restartDeadWorkers')); echo $this->Form->create('Server', array('url' => $baseurl . '/servers/restartDeadWorkers'));
echo $this->Form->button(__('Restart dead workers'), array('class' => 'btn btn-primary')); echo $this->Form->button(__('Restart dead workers'), array('class' => 'btn btn-primary'));
echo $this->Form->end(); echo $this->Form->end();
} }

View File

@ -12,7 +12,7 @@
<div style="padding-left:0px;padding-right:5px;float:left;"> <div style="padding-left:0px;padding-right:5px;float:left;">
<?php if ($isSiteAdmin): ?> <?php if ($isSiteAdmin): ?>
<?php <?php
echo $this->Form->create('Server', array('id' => 'removeTag_' . h($tag['Tag']['id']), 'url' => '/servers/removeTag/' . h($server['Server']['id']) . '/' . h($tag['Tag']['id']), 'style' => 'margin:0px;')); echo $this->Form->create('Server', array('id' => 'removeTag_' . h($tag['Tag']['id']), 'url' => $baseurl . '/servers/removeTag/' . h($server['Server']['id']) . '/' . h($tag['Tag']['id']), 'style' => 'margin:0px;'));
?> ?>
<div title="<?php echo __('Remove tag');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag');?>" class="tagSecondHalf useCursorPointer noPrint" onClick="removeServerTag('<?php echo h($server['Server']['id']); ?>', '<?php echo h($tag['Tag']['id']); ?>');">x</div> <div title="<?php echo __('Remove tag');?>" role="button" tabindex="0" aria-label="<?php echo __('Remove tag');?>" class="tagSecondHalf useCursorPointer noPrint" onClick="removeServerTag('<?php echo h($server['Server']['id']); ?>', '<?php echo h($tag['Tag']['id']); ?>');">x</div>
<?php <?php

View File

@ -16,7 +16,7 @@
</div><br /> </div><br />
<div class="input file" id="file_container_<?php echo $element_id;?>"> <div class="input file" id="file_container_<?php echo $element_id;?>">
</div> </div>
<iframe id="iframe_<?php echo $element_id; ?>" src="/templates/uploadFile/<?php echo $element_id; ?>/<?php echo ($element['batch'] ? 'yes' : 'no'); ?>" style="border:0px;height:30px;width:100%;overflow:hidden;" scrolling="no"></iframe> <iframe id="iframe_<?php echo $element_id; ?>" src="<?php echo $baseurl; ?>/templates/uploadFile/<?php echo $element_id; ?>/<?php echo ($element['batch'] ? 'yes' : 'no'); ?>" style="border:0px;height:30px;width:100%;overflow:hidden;" scrolling="no"></iframe>
<div class="error-message populateTemplateErrorField" <?php if (!isset($errors[$element_id])) echo 'style="display:none;"';?>> <div class="error-message populateTemplateErrorField" <?php if (!isset($errors[$element_id])) echo 'style="display:none;"';?>>
<?php echo __('Error') . ': ' . $errors[$element_id]; ?> <?php echo __('Error') . ': ' . $errors[$element_id]; ?>
</div> </div>

View File

@ -95,7 +95,8 @@ foreach($tabs as $tabName => $column):
<div class="hidden"> <div class="hidden">
<?php <?php
$url = sprintf( $url = sprintf(
'/galaxies/attachMultipleClusters/%s/%s/local:%s', '%s/galaxies/attachMultipleClusters/%s/%s/local:%s',
$baseurl,
empty($target_id) ? $eventId : $target_id, empty($target_id) ? $eventId : $target_id,
empty($target_type) ? 'event' : $target_type, empty($target_type) ? 'event' : $target_type,
empty($local) ? '0' : '1' empty($local) ? '0' : '1'

View File

@ -1,6 +1,6 @@
<?php <?php
$url_params = $action == 'add' ? 'add/' . $event_id : 'edit/' . $eventGraph['id']; $url_params = $action == 'add' ? 'add/' . $event_id : 'edit/' . $eventGraph['id'];
echo $this->Form->create('EventGraph', array('url' => '/EventGraph/' . $url_params)); echo $this->Form->create('EventGraph', array('url' => $baseurl . '/EventGraph/' . $url_params));
?> ?>
<fieldset> <fieldset>
<legend><?php echo $action == 'add' ? __('Add EventGraph') : __('Edit EventGraph'); ?></legend> <legend><?php echo $action == 'add' ? __('Add EventGraph') : __('Edit EventGraph'); ?></legend>

View File

@ -1,6 +1,6 @@
<div class="confirmation"> <div class="confirmation">
<?php <?php
echo $this->Form->create('Event', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/events/delete')); echo $this->Form->create('Event', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => $baseurl . '/events/delete'));
echo $this->Form->hidden('id'); echo $this->Form->hidden('id');
?> ?>
<legend><?php echo __('Event Deletion');?></legend> <legend><?php echo __('Event Deletion');?></legend>

View File

@ -1,6 +1,6 @@
<div class="confirmation"> <div class="confirmation">
<?php <?php
echo $this->Form->create('Event', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/events/' . $type . '/' . $id)); echo $this->Form->create('Event', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => $baseurl . '/events/' . $type . '/' . $id));
$extraTitle = ""; $extraTitle = "";
if ($type == 'publish') $extraTitle = ' (no email)'; if ($type == 'publish') $extraTitle = ' (no email)';
$message = __('Publish Event%s', $extraTitle); $message = __('Publish Event%s', $extraTitle);

View File

@ -1,5 +1,5 @@
<?php <?php
echo $this->Form->create('Event', array('class' => 'inline-form inline-field-form', 'url' => '/events/quickEdit/' . $event['Event']['id'] . '/' . $field)); echo $this->Form->create('Event', array('class' => 'inline-form inline-field-form', 'url' => $baseurl . '/events/quickEdit/' . $event['Event']['id'] . '/' . $field));
?> ?>
<div class='inline-input inline-input-container'> <div class='inline-input inline-input-container'>
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" title="<?php echo __('Accept');?>" role="button" tabindex="0" aria-label="<?php echo __('Accept');?>"></span></div> <div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" title="<?php echo __('Accept');?>" role="button" tabindex="0" aria-label="<?php echo __('Accept');?>"></span></div>

View File

@ -1,6 +1,6 @@
<div class="confirmation"> <div class="confirmation">
<?php <?php
echo $this->Form->create('Event', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/events/toggleCorrelation/' . $event['Event']['id'])); echo $this->Form->create('Event', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => $baseurl . '/events/toggleCorrelation/' . $event['Event']['id']));
$extraTitle = ""; $extraTitle = "";
?> ?>
<legend><?php echo __('Toggle Correlation %s', $event['Event']['disable_correlation'] ? __('on') : __('off'));?></legend> <legend><?php echo __('Toggle Correlation %s', $event['Event']['disable_correlation'] ? __('on') : __('off'));?></legend>

View File

@ -2,9 +2,9 @@
<h2><?php echo __('Automation');?></h2> <h2><?php echo __('Automation');?></h2>
<p><?php echo __('Automation functionality is designed to automatically feed other tools and systems with the data in your MISP repository. <p><?php echo __('Automation functionality is designed to automatically feed other tools and systems with the data in your MISP repository.
To to make this functionality available for automated tools an authentication key is used.');?> To to make this functionality available for automated tools an authentication key is used.');?>
<br /><?php echo __('You can use the <a href="/servers/rest">REST client</a> to test your API queries against your MISP and export the resulting tuned queries as curl or python scripts.');?> <br /><?php echo __('You can use the <a href="' . $baseurl . '/servers/rest">REST client</a> to test your API queries against your MISP and export the resulting tuned queries as curl or python scripts.');?>
<strong><?php echo __('Make sure you keep your API key secret as it gives access to the all of the data that you normally have access to in MISP.');?></strong> <strong><?php echo __('Make sure you keep your API key secret as it gives access to the all of the data that you normally have access to in MISP.');?></strong>
<?php echo __('To view the old MISP automation page, click <a href="automation/1">here</a>.');?> <?php echo __('To view the old MISP automation page, click <a href="' . $baseurl . '/automation/1">here</a>.');?>
</p> </p>
<span> <span>
<?php <?php

View File

@ -175,7 +175,7 @@
<script type="text/javascript"> <script type="text/javascript">
function generate(i, type, id, progress, modified) { function generate(i, type, id, progress, modified) {
$.ajax({ $.ajax({
url: "/jobs/cache/" + type, url: "<?php echo $baseurl; ?>/jobs/cache/" + type,
}) })
.done(function(data) { .done(function(data) {
jobsArray[i] = data; jobsArray[i] = data;
@ -186,7 +186,7 @@
} }
function queryTask(type, i){ function queryTask(type, i){
$.getJSON('/jobs/getProgress/cache_' + type, function(data) { $.getJSON('<?php echo $baseurl; ?>/jobs/getProgress/cache_' + type, function(data) {
var x = document.getElementById("bar" + i); var x = document.getElementById("bar" + i);
x.style.width = data+"%"; x.style.width = data+"%";
if (data > -1 && data < 100) { if (data > -1 && data < 100) {

View File

@ -61,7 +61,7 @@
), ),
array( array(
'requirement' => count($passedArgsArray) > 0, 'requirement' => count($passedArgsArray) > 0,
'url' => '/events/index', 'url' => $baseurl . '/events/index',
'title' => __('Remove filters'), 'title' => __('Remove filters'),
'fa-icon' => 'times' 'fa-icon' => 'times'
) )

View File

@ -19,7 +19,7 @@
$instanceDefault = Configure::read('MISP.default_attribute_distribution'); $instanceDefault = Configure::read('MISP.default_attribute_distribution');
} }
} }
echo $this->Form->create('Attribute', array('url' => '/events/saveFreeText/' . $event['Event']['id'], 'class' => 'mainForm')); echo $this->Form->create('Attribute', array('url' => $baseurl . '/events/saveFreeText/' . $event['Event']['id'], 'class' => 'mainForm'));
if ($isSiteAdmin) { if ($isSiteAdmin) {
echo $this->Form->input('force', array( echo $this->Form->input('force', array(
'checked' => false, 'checked' => false,

View File

@ -2,7 +2,7 @@
<h2><?php echo h($title); ?></h2> <h2><?php echo h($title); ?></h2>
<?php <?php
$event_id = $event['Event']['id']; $event_id = $event['Event']['id'];
$url = '/events/handleModuleResults/' . $event_id; $url = $baseurl . '/events/handleModuleResults/' . $event_id;
echo $this->Form->create('Event', array('url' => $url, 'class' => 'mainForm')); echo $this->Form->create('Event', array('url' => $url, 'class' => 'mainForm'));
$formSettings = array( $formSettings = array(
'type' => 'hidden', 'type' => 'hidden',

View File

@ -250,7 +250,7 @@
} }
$table_data[] = array( $table_data[] = array(
'key' => __('Sightings'), 'key' => __('Sightings'),
'element' => '/Events/View/eventSightingValue', 'element' => $baseurl . '/Events/View/eventSightingValue',
'element_params' => array( 'element_params' => array(
'sightingPopover' => $sightingPopover, 'sightingPopover' => $sightingPopover,
'event' => $event, 'event' => $event,
@ -563,20 +563,20 @@ $(document).ready(function () {
delay: { show: 500, hide: 100 } delay: { show: 500, hide: 100 }
}); });
$.get("/threads/view/<?php echo h($event['Event']['id']); ?>/true", function(data) { $.get("<?php echo $baseurl; ?>/threads/view/<?php echo h($event['Event']['id']); ?>/true", function(data) {
$("#discussions_div").html(data); $("#discussions_div").html(data);
}); });
}); });
function enable_correlation_graph() { function enable_correlation_graph() {
$.get("/events/viewGraph/<?php echo h($event['Event']['id']); ?>", function(data) { $.get("<?php echo $baseurl; ?>/events/viewGraph/<?php echo h($event['Event']['id']); ?>", function(data) {
$("#correlationgraph_div").html(data); $("#correlationgraph_div").html(data);
}); });
} }
function enable_attack_matrix() { function enable_attack_matrix() {
$.get("/events/viewGalaxyMatrix/<?php echo h($event['Event']['id']); ?>/<?php echo h($mitreAttackGalaxyId); ?>/event/1", function(data) { $.get("<?php echo $baseurl; ?>/events/viewGalaxyMatrix/<?php echo h($event['Event']['id']); ?>/<?php echo h($mitreAttackGalaxyId); ?>/event/1", function(data) {
$("#attackmatrix_div").html(data); $("#attackmatrix_div").html(data);
}); });
} }

View File

@ -1,5 +1,5 @@
<?php <?php
echo $this->Form->create('FavouriteTag', array('id' => 'FavouriteTagIndexForm', 'url' => '/favourite_tags/toggle')); echo $this->Form->create('FavouriteTag', array('id' => 'FavouriteTagIndexForm', 'url' => $baseurl . '/favourite_tags/toggle'));
echo $this->Form->input('data', array('label' => false, 'style' => 'display:none;')); echo $this->Form->input('data', array('label' => false, 'style' => 'display:none;'));
echo $this->Form->end(); echo $this->Form->end();
?> ?>

View File

@ -37,25 +37,25 @@
array( array(
'children' => array( 'children' => array(
array( array(
'url' => '/feeds/index/scope:default', 'url' => $baseurl . '/feeds/index/scope:default',
'text' => __('Default feeds'), 'text' => __('Default feeds'),
'active' => $scope === 'default', 'active' => $scope === 'default',
'style' => 'display:inline;' 'style' => 'display:inline;'
), ),
array( array(
'url' => '/feeds/index/scope:custom', 'url' => $baseurl . '/feeds/index/scope:custom',
'text' => __('Custom feeds'), 'text' => __('Custom feeds'),
'active' => $scope === 'custom', 'active' => $scope === 'custom',
'style' => 'display:inline;' 'style' => 'display:inline;'
), ),
array( array(
'url' => '/feeds/index/scope:all', 'url' => $baseurl . '/feeds/index/scope:all',
'text' => __('All feeds'), 'text' => __('All feeds'),
'active' => $scope === 'all', 'active' => $scope === 'all',
'style' => 'display:inline;' 'style' => 'display:inline;'
), ),
array( array(
'url' => '/feeds/index/scope:enabled', 'url' => $baseurl . '/feeds/index/scope:enabled',
'text' => __('Enabled feeds'), 'text' => __('Enabled feeds'),
'active' => $scope === 'enabled', 'active' => $scope === 'enabled',
'style' => 'display:inline;' 'style' => 'display:inline;'

View File

@ -3,7 +3,7 @@
<div class="pagination"> <div class="pagination">
<ul> <ul>
<?php <?php
$eventViewURL = '/feeds/previewEvent/' . h($id) . '/'; $eventViewURL = $baseurl . '/feeds/previewEvent/' . h($id) . '/';
$this->Paginator->options(array( $this->Paginator->options(array(
'url' => $id, 'url' => $id,
'update' => '.span12', 'update' => '.span12',
@ -69,7 +69,7 @@
</td> </td>
<td ondblclick="document.location.href ='<?php echo $eventViewURL . h($uuid);?>'" class="short"><?php echo h($event['timestamp']); ?></td> <td ondblclick="document.location.href ='<?php echo $eventViewURL . h($uuid);?>'" class="short"><?php echo h($event['timestamp']); ?></td>
<td class="short action-links"> <td class="short action-links">
<?php if ($feed['Feed']['enabled'] && $isSiteAdmin) echo $this->Form->postLink('', '/feeds/getEvent/' . $id . '/' . $uuid, array('class' => 'fa fa-arrow-circle-down', 'title' => __('Fetch the event')), __('Are you sure you want to fetch and save this event on your instance?', $this->Form->value('Feed.id'))); ?> <?php if ($feed['Feed']['enabled'] && $isSiteAdmin) echo $this->Form->postLink('', $baseurl . '/feeds/getEvent/' . $id . '/' . $uuid, array('class' => 'fa fa-arrow-circle-down', 'title' => __('Fetch the event')), __('Are you sure you want to fetch and save this event on your instance?', $this->Form->value('Feed.id'))); ?>
<a href='<?php echo $eventViewURL . h($uuid);?>' class = "fa fa-eye" title = "<?php echo __('View');?>" aria-label = "<?php echo __('View');?>"></a> <a href='<?php echo $eventViewURL . h($uuid);?>' class = "fa fa-eye" title = "<?php echo __('View');?>" aria-label = "<?php echo __('View');?>"></a>
</td> </td>
</tr> </tr>

View File

@ -32,7 +32,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
<?php <?php
$uri = "/galaxy_clusters/index/" . $galaxy['Galaxy']['id']; $uri = $baseurl . "/galaxy_clusters/index/" . $galaxy['Galaxy']['id'];
if (isset($passedArgsArray)) { if (isset($passedArgsArray)) {
$uri .= '/searchall:' . $passedArgsArray['all']; $uri .= '/searchall:' . $passedArgsArray['all'];
} }

View File

@ -39,10 +39,10 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function () { $(document).ready(function () {
$.get("/galaxy_elements/index/<?php echo $cluster['GalaxyCluster']['id']; ?>", function(data) { $.get("<?php echo $baseurl; ?>/galaxy_elements/index/<?php echo $cluster['GalaxyCluster']['id']; ?>", function(data) {
$("#elements_div").html(data); $("#elements_div").html(data);
}); });
$.get("/galaxy_clusters/viewGalaxyMatrix/<?php echo $cluster['GalaxyCluster']['id']; ?>", function(data) { $.get("<?php echo $baseurl; ?>/galaxy_clusters/viewGalaxyMatrix/<?php echo $cluster['GalaxyCluster']['id']; ?>", function(data) {
$("#matrix_container").html(data); $("#matrix_container").html(data);
}); });
}); });

View File

@ -18,7 +18,8 @@ App::uses('AppHelper', 'View/Helper');
if (!empty($imgOptions)) { if (!empty($imgOptions)) {
foreach ($imgOptions as $field => $imgOption) { foreach ($imgOptions as $field => $imgOption) {
$result = sprintf( $result = sprintf(
'<img src="/img/orgs/%s" title="%s" width="%s" height="%s">', '<img src="%s/img/orgs/%s" title="%s" width="%s" height="%s">',
$baseurl,
$imgOption, $imgOption,
isset($options['name']) ? h($options['name']) : h($options['id']), isset($options['name']) ? h($options['name']) : h($options['id']),
(int)$size, (int)$size,
@ -27,7 +28,8 @@ App::uses('AppHelper', 'View/Helper');
if (!$raw) { if (!$raw) {
$result = sprintf( $result = sprintf(
'<a href="/organisations/view/%s">%s</a>', '<a href="%s/organisations/view/%s">%s</a>',
$baseurl,
(empty($options['id']) ? h($options['name']) : h($options['id'])), (empty($options['id']) ? h($options['name']) : h($options['id'])),
$result $result
); );
@ -42,7 +44,8 @@ App::uses('AppHelper', 'View/Helper');
); );
} else { } else {
$result = sprintf( $result = sprintf(
'<a href="/organisations/view/%s"><span class="welcome">%s</span></a>', '<a href="%s/organisations/view/%s"><span class="welcome">%s</span></a>',
$baseurl,
(empty($options['id']) ? h($options['name']) : h($options['id'])), (empty($options['id']) ? h($options['name']) : h($options['id'])),
h($options['name']) h($options['name'])
); );

View File

@ -40,7 +40,7 @@
function queueInterval(k, id) { function queueInterval(k, id) {
intervalArray[k] = setInterval(function() { intervalArray[k] = setInterval(function() {
if (tabIsActive) { if (tabIsActive) {
$.getJSON('/jobs/getGenerateCorrelationProgress/' + id, function(data) { $.getJSON('<?php echo $baseurl; ?>/jobs/getGenerateCorrelationProgress/' + id, function(data) {
var x = document.getElementById("bar" + id); var x = document.getElementById("bar" + id);
x.style.width = data+"%"; x.style.width = data+"%";
if (data > 0 && data < 100) { if (data > 0 && data < 100) {
@ -61,25 +61,25 @@
array( array(
'children' => array( 'children' => array(
array( array(
'url' => '/jobs/index', 'url' => $baseurl . '/jobs/index',
'text' => __('All'), 'text' => __('All'),
'title' => __('Show all queues'), 'title' => __('Show all queues'),
'active' => !$queue 'active' => !$queue
), ),
array( array(
'url' => '/jobs/index/default', 'url' => $baseurl . '/jobs/index/default',
'text' => __('Default'), 'text' => __('Default'),
'title' => __('Show default queue'), 'title' => __('Show default queue'),
'active' => $queue === 'default' 'active' => $queue === 'default'
), ),
array( array(
'url' => '/jobs/index/email', 'url' => $baseurl . '/jobs/index/email',
'text' => __('Email'), 'text' => __('Email'),
'titles' => __('Show email queue'), 'titles' => __('Show email queue'),
'active' => $queue === 'email' 'active' => $queue === 'email'
), ),
array( array(
'url' => '/jobs/index/cache', 'url' => $baseurl . '/jobs/index/cache',
'text' => __('Cache'), 'text' => __('Cache'),
'title' => __('Show cache queue'), 'title' => __('Show cache queue'),
'active' => $queue === 'cache' 'active' => $queue === 'cache'
@ -147,7 +147,7 @@
echo h($item['Job']['job_status']); echo h($item['Job']['job_status']);
if ($item['Job']['failed']): if ($item['Job']['failed']):
?> ?>
<div class="fa fa-search useCursorPointer queryPopover" title="<?php echo __('View stacktrace');?>" role="button" tabindex="0" aria-label="<?php echo __('View stacktrace');?>" data-url="/jobs/getError" data-id="<?php echo h($item['Job']['process_id']); ?>"></div> <div class="fa fa-search useCursorPointer queryPopover" title="<?php echo __('View stacktrace');?>" role="button" tabindex="0" aria-label="<?php echo __('View stacktrace');?>" data-url="<?php echo $basurl; ?>/jobs/getError" data-id="<?php echo h($item['Job']['process_id']); ?>"></div>
<?php <?php
endif; endif;
?> ?>

View File

@ -53,12 +53,12 @@
'text' => h($filterData['name']), 'text' => h($filterData['name']),
'title' => __('Modify filters'), 'title' => __('Modify filters'),
'active' => isset($filter) && $filterName === $filter, 'active' => isset($filter) && $filterName === $filter,
'url' => '/admin/logs/index/filter:' . h($filterName) 'url' => $baseurl . '/admin/logs/index/filter:' . h($filterName)
); );
} }
$data['children'][0]['children'][] = array( $data['children'][0]['children'][] = array(
'requirement' => !empty($filter), 'requirement' => !empty($filter),
'url' => '/admin/logs/index', 'url' => $baseurl . '/admin/logs/index',
'title' => __('Remove filters'), 'title' => __('Remove filters'),
'fa-icon' => 'times' 'fa-icon' => 'times'
); );

View File

@ -1,4 +1,4 @@
<?php <?php
echo $this->Form->create('Noticelist', array('id' => 'NoticelistIndexForm', 'url' => '/noticelists/toggleEnable')); echo $this->Form->create('Noticelist', array('id' => 'NoticelistIndexForm', 'url' => $baseurl . '/noticelists/toggleEnable'));
echo $this->Form->input('data', array('id' => 'NoticelistData', 'label' => false, 'style' => 'display:none;')); echo $this->Form->input('data', array('id' => 'NoticelistData', 'label' => false, 'style' => 'display:none;'));
echo $this->Form->end(); echo $this->Form->end();

View File

@ -19,7 +19,7 @@
<div id="hiddenFormDiv"> <div id="hiddenFormDiv">
<?php <?php
if ($isSiteAdmin) { if ($isSiteAdmin) {
echo $this->Form->create('Noticelist', array('url' => '/noticelists/toggleEnable')); echo $this->Form->create('Noticelist', array('url' => $baseurl . '/noticelists/toggleEnable'));
echo $this->Form->input('data', array('label' => false, 'style' => 'display:none;')); echo $this->Form->input('data', array('label' => false, 'style' => 'display:none;'));
echo $this->Form->end(); echo $this->Form->end();
} }

View File

@ -1,5 +1,5 @@
<div class="popover_choice"> <div class="popover_choice">
<?php echo $this->Form->create('ObjectReference', array('url' => '/objectReferences/add/' . $objectId));?> <?php echo $this->Form->create('ObjectReference', array('url' => $baseurl . '/objectReferences/add/' . $objectId));?>
<fieldset> <fieldset>
<legend><?php echo __('Add Object Reference'); ?></legend> <legend><?php echo __('Add Object Reference'); ?></legend>
<div class="overlay_spacing"> <div class="overlay_spacing">

View File

@ -1,6 +1,6 @@
<div class="confirmation"> <div class="confirmation">
<?php <?php
$url = '/object_references/delete/' . $id; $url = $baseurl . '/object_references/delete/' . $id;
if ($hard) { if ($hard) {
$url .= '/true'; $url .= '/true';
} }

View File

@ -1,4 +1,4 @@
<?php <?php
echo $this->Form->create('ObjectTemplate', array('url' => '/ObjectTemplates/activate', 'id' => 'ObjectTemplateIndexForm')); echo $this->Form->create('ObjectTemplate', array('url' => $baseurl . '/ObjectTemplates/activate', 'id' => 'ObjectTemplateIndexForm'));
echo $this->Form->input('data', array('label' => false, 'style' => 'display:none;')); echo $this->Form->input('data', array('label' => false, 'style' => 'display:none;'));
echo $this->Form->end(); echo $this->Form->end();

View File

@ -19,7 +19,7 @@
<div id="hiddenFormDiv"> <div id="hiddenFormDiv">
<?php <?php
if ($isSiteAdmin) { if ($isSiteAdmin) {
echo $this->Form->create('ObjectTemplate', array('url' => '/ObjectTemplates/activate')); echo $this->Form->create('ObjectTemplate', array('url' => $baseurl . '/ObjectTemplates/activate'));
echo $this->Form->input('data', array('label' => false, 'style' => 'display:none;')); echo $this->Form->input('data', array('label' => false, 'style' => 'display:none;'));
echo $this->Form->end(); echo $this->Form->end();
} }
@ -31,12 +31,12 @@
array( array(
'children' => array( 'children' => array(
array( array(
'url' => '/objectTemplates/index', 'url' => $baseurl . '/objectTemplates/index',
'text' => __('Enabled'), 'text' => __('Enabled'),
'active' => !$all 'active' => !$all
), ),
array( array(
'url' => '/objectTemplates/index/all', 'url' => $baseurl . '/objectTemplates/index/all',
'text' => __('All'), 'text' => __('All'),
'active' => $all 'active' => $all
) )
@ -118,7 +118,7 @@ foreach ($list as $template):
?> ?>
</td> </td>
<td class="short action-links"> <td class="short action-links">
<a href='/objectTemplates/view/<?php echo $template['ObjectTemplate']['id']; ?>' class = "fa fa-eye" title = "<?php echo __('View');?>" aria-label = "<?php echo __('View');?>"></a> <a href='<?php echo $baseurl; ?>/objectTemplates/view/<?php echo $template['ObjectTemplate']['id']; ?>' class = "fa fa-eye" title = "<?php echo __('View');?>" aria-label = "<?php echo __('View');?>"></a>
<?php <?php
if ($isSiteAdmin): if ($isSiteAdmin):
echo $this->Form->postLink('', array('action' => 'update', $template['ObjectTemplate']['name'], 1), array('class' => 'fa fa-sync', 'title' => __('Force update')), __('Are you sure you want to force an update for template # %s?', $template['ObjectTemplate']['id'])); echo $this->Form->postLink('', array('action' => 'update', $template['ObjectTemplate']['name'], 1), array('class' => 'fa fa-sync', 'title' => __('Force update')), __('Are you sure you want to force an update for template # %s?', $template['ObjectTemplate']['id']));

View File

@ -1,7 +1,7 @@
<?php $update_template_available = isset($update_template_available) ? $update_template_available : false; ?> <?php $update_template_available = isset($update_template_available) ? $update_template_available : false; ?>
<div class="<?php if (!isset($ajax) || !$ajax) echo 'form';?>"> <div class="<?php if (!isset($ajax) || !$ajax) echo 'form';?>">
<?php <?php
$url = ($action == 'add') ? '/objects/revise_object/add/' . $event['Event']['id'] . '/' . $template['ObjectTemplate']['id'] : '/objects/revise_object/edit/' . $event['Event']['id'] . '/' . $template['ObjectTemplate']['id'] . '/' . h($object['Object']['id']); $url = $baseurl . ($action == 'add') ? '/objects/revise_object/add/' . $event['Event']['id'] . '/' . $template['ObjectTemplate']['id'] : '/objects/revise_object/edit/' . $event['Event']['id'] . '/' . $template['ObjectTemplate']['id'] . '/' . h($object['Object']['id']);
echo $this->Form->create('Object', array('id', 'url' => $url, 'enctype' => 'multipart/form-data')); echo $this->Form->create('Object', array('id', 'url' => $url, 'enctype' => 'multipart/form-data'));
?> ?>
<h3><?php echo ucfirst($action) . ' ' . Inflector::humanize(h($template['ObjectTemplate']['name'])) . __(' Object'); ?></h3> <h3><?php echo ucfirst($action) . ' ' . Inflector::humanize(h($template['ObjectTemplate']['name'])) . __(' Object'); ?></h3>

View File

@ -1,5 +1,5 @@
<?php <?php
echo $this->Form->create('Object', array('class' => 'inline-form inline-field-form', 'id' => 'Object_' . $object['id'] . '_comment_form', 'url' => '/objects/editField/' . $object['id'])); echo $this->Form->create('Object', array('class' => 'inline-form inline-field-form', 'id' => 'Object_' . $object['id'] . '_comment_form', 'url' => $baseurl . '/objects/editField/' . $object['id']));
?> ?>
<div class='inline-input inline-input-container'> <div class='inline-input inline-input-container'>
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div> <div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" role="button" tabindex="0" aria-label="<?php echo __('Accept change'); ?>"></span></div>

View File

@ -2,7 +2,7 @@
<h3><?php echo __('Object pre-save review');?></h3> <h3><?php echo __('Object pre-save review');?></h3>
<p><?php echo __('Make sure that the below Object reflects your expectation before submitting it.');?></p> <p><?php echo __('Make sure that the below Object reflects your expectation before submitting it.');?></p>
<?php <?php
$url = ($action == 'add') ? '/objects/add/' . $event['Event']['id'] . '/' . $template['ObjectTemplate']['id'] : '/objects/edit/' . $object_id; $url = $baseurl . ($action == 'add') ? '/objects/add/' . $event['Event']['id'] . '/' . $template['ObjectTemplate']['id'] : '/objects/edit/' . $object_id;
echo $this->Form->create('Object', array('id', 'url' => $url)); echo $this->Form->create('Object', array('id', 'url' => $url));
$formSettings = array( $formSettings = array(
'type' => 'hidden', 'type' => 'hidden',

View File

@ -56,17 +56,17 @@
array( array(
'text' => __('Local organisations'), 'text' => __('Local organisations'),
'active' => $scope === 'local', 'active' => $scope === 'local',
'url' => '/organisations/index/scope:local' 'url' => $baseurl . '/organisations/index/scope:local'
), ),
array( array(
'text' => __('Known remote organisations'), 'text' => __('Known remote organisations'),
'active' => $scope === 'external', 'active' => $scope === 'external',
'url' => '/organisations/index/scope:external' 'url' => $baseurl . '/organisations/index/scope:external'
), ),
array( array(
'text' => __('All organisations'), 'text' => __('All organisations'),
'active' => $scope === 'all', 'active' => $scope === 'all',
'url' => '/organisations/index/scope:all' 'url' => $baseurl . '/organisations/index/scope:all'
), ),
) )
), ),
@ -104,27 +104,27 @@
<?php <?php
foreach ($orgs as $org): ?> foreach ($orgs as $org): ?>
<tr> <tr>
<td class="short" ondblclick="document.location.href ='/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['id']); ?></td> <td class="short" ondblclick="document.location.href ='<?php echo $baseurl; ?>/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['id']); ?></td>
<td class="short" ondblclick="document.location.href ='/organisations/view/<?php echo $org['Organisation']['id'];?>'"> <td class="short" ondblclick="document.location.href ='<?php echo $baseurl; ?>/organisations/view/<?php echo $org['Organisation']['id'];?>'">
<?php <?php
echo $this->OrgImg->getOrgImg(array('name' => $org['Organisation']['name'], 'id' => $org['Organisation']['id'], 'size' => 24)); echo $this->OrgImg->getOrgImg(array('name' => $org['Organisation']['name'], 'id' => $org['Organisation']['id'], 'size' => 24));
?> ?>
</td> </td>
<td class="short" ondblclick="document.location.href ='/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['name']); ?></td> <td class="short" ondblclick="document.location.href ='<?php echo $baseurl; ?>/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['name']); ?></td>
<?php if ($isSiteAdmin): ?> <?php if ($isSiteAdmin): ?>
<td class="short" ondblclick="document.location.href ='/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['uuid']); ?></td> <td class="short" ondblclick="document.location.href ='<?php echo $baseurl; ?>/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['uuid']); ?></td>
<?php endif; ?> <?php endif; ?>
<td ondblclick="document.location.href ='/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['description']); ?></td> <td ondblclick="document.location.href ='<?php echo $baseurl; ?>/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['description']); ?></td>
<td class="short" ondblclick="document.location.href ='/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['nationality']); ?></td> <td class="short" ondblclick="document.location.href ='<?php echo $baseurl; ?>/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['nationality']); ?></td>
<td class="short" ondblclick="document.location.href ='/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['sector']); ?></td> <td class="short" ondblclick="document.location.href ='<?php echo $baseurl; ?>/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['sector']); ?></td>
<td class="short" ondblclick="document.location.href ='/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['type']); ?></td> <td class="short" ondblclick="document.location.href ='<?php echo $baseurl; ?>/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo h($org['Organisation']['type']); ?></td>
<td><?php echo h($org['Organisation']['contacts']); ?></td> <td><?php echo h($org['Organisation']['contacts']); ?></td>
<?php if ($isSiteAdmin): ?> <?php if ($isSiteAdmin): ?>
<td class="short" ondblclick="document.location.href ='/organisations/view/<?php echo $org['Organisation']['id'];?>'"> <td class="short" ondblclick="document.location.href ='<?php echo $baseurl; ?>/organisations/view/<?php echo $org['Organisation']['id'];?>'">
<?php echo (isset($org['Organisation']['created_by_email'])) ? h($org['Organisation']['created_by_email']) : '&nbsp;'; ?> <?php echo (isset($org['Organisation']['created_by_email'])) ? h($org['Organisation']['created_by_email']) : '&nbsp;'; ?>
</td> </td>
<?php endif; ?> <?php endif; ?>
<td class="short <?php echo $org['Organisation']['local'] ? 'green' : 'red';?>" ondblclick="document.location.href ='/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo $org['Organisation']['local'] ? __('Yes') : __('No');?></td> <td class="short <?php echo $org['Organisation']['local'] ? 'green' : 'red';?>" ondblclick="document.location.href ='<?php echo $baseurl; ?>/organisations/view/<?php echo $org['Organisation']['id'];?>'"><?php echo $org['Organisation']['local'] ? __('Yes') : __('No');?></td>
<td class="short"><?php echo isset($org['Organisation']['user_count']) ? $org['Organisation']['user_count'] : '0';?></td> <td class="short"><?php echo isset($org['Organisation']['user_count']) ? $org['Organisation']['user_count'] : '0';?></td>
<td class="short"> <td class="short">
<?php <?php
@ -135,12 +135,12 @@ foreach ($orgs as $org): ?>
</td> </td>
<td class="short action-links"> <td class="short action-links">
<?php if ($isSiteAdmin): ?> <?php if ($isSiteAdmin): ?>
<a href='/admin/organisations/edit/<?php echo $org['Organisation']['id'];?>' class = "fa fa-edit" title = "<?php echo __('Edit');?>" aria-label = "<?php echo __('Edit');?>"></a> <a href='<?php echo $baseurl . "/admin/organisations/edit/" . $org['Organisation']['id'];?>' class = "fa fa-edit" title = "<?php echo __('Edit');?>" aria-label = "<?php echo __('Edit');?>"></a>
<?php <?php
echo $this->Form->postLink('', array('admin' => true, 'action' => 'delete', $org['Organisation']['id']), array('class' => 'fa fa-trash', 'title' => __('Delete'), 'aria-label' => __('Delete')), __('Are you sure you want to delete %s?', $org['Organisation']['name'])); echo $this->Form->postLink('', array('admin' => true, 'action' => 'delete', $org['Organisation']['id']), array('class' => 'fa fa-trash', 'title' => __('Delete'), 'aria-label' => __('Delete')), __('Are you sure you want to delete %s?', $org['Organisation']['name']));
?> ?>
<?php endif; ?> <?php endif; ?>
<a href='/organisations/view/<?php echo $org['Organisation']['id']; ?>' class = "fa fa-eye" title = "<?php echo __('View');?>" aria-label = "<?php echo __('View');?>"></a> <a href='<?php echo $baseurl . "/organisations/view/" . $org['Organisation']['id']; ?>' class = "fa fa-eye" title = "<?php echo __('View');?>" aria-label = "<?php echo __('View');?>"></a>
</td> </td>
</tr> </tr>
<?php <?php

View File

@ -1,5 +1,5 @@
<?php <?php
echo $this->Form->create('Server', array('class' => 'inline-form inline-field-form', 'url' => '/servers/serverSettingsEdit/' . $setting['setting'] . '/' . $id . '/' . '1', 'id' => 'setting_' . $subGroup . '_' . $id . '_form')); echo $this->Form->create('Server', array('class' => 'inline-form inline-field-form', 'url' => $baseurl . '/servers/serverSettingsEdit/' . $setting['setting'] . '/' . $id . '/' . '1', 'id' => 'setting_' . $subGroup . '_' . $id . '_form'));
?> ?>
<div class='inline-input inline-input-container'> <div class='inline-input inline-input-container'>
<div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" title="<?php echo __('Accept');?>" role="button" tabindex="0" aria-label="<?php echo __('Accept');?>"></span></div> <div class="inline-input-accept inline-input-button inline-input-passive"><span class = "icon-ok" title="<?php echo __('Accept');?>" role="button" tabindex="0" aria-label="<?php echo __('Accept');?>"></span></div>

View File

@ -1,6 +1,6 @@
<div class="confirmation"> <div class="confirmation">
<?php <?php
echo $this->Form->create('Server', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/servers/update')); echo $this->Form->create('Server', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => $baseurl . '/servers/update'));
?> ?>
<legend>Update MISP</legend> <legend>Update MISP</legend>
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;"> <div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">

View File

@ -1,5 +1,5 @@
<div class="events"> <div class="events">
<?php echo $this->Form->create('Event', array('id' => 'test', 'url' => '/events/index'));?> <?php echo $this->Form->create('Event', array('id' => 'test', 'url' => $baseurl . '/events/index'));?>
<fieldset> <fieldset>
<legend><?php echo __('Filter Event Index');?></legend> <legend><?php echo __('Filter Event Index');?></legend>
<div class="overlay_spacing"> <div class="overlay_spacing">
@ -27,7 +27,7 @@
<script type="text/javascript"> <script type="text/javascript">
var filterContext = "event"; var filterContext = "event";
var actionUrl = "<?php echo '/servers/previewIndex/' . h($id); ?>" var actionUrl = "<?php echo $baseurl . '/servers/previewIndex/' . h($id); ?>"
$(document).ready(function() { $(document).ready(function() {
$('.datepicker').datepicker().on('changeDate', function(ev) { $('.datepicker').datepicker().on('changeDate', function(ev) {
$('.dropdown-menu').hide(); $('.dropdown-menu').hide();

View File

@ -158,12 +158,12 @@ foreach ($servers as $row_pos => $server):
<td class="short"><span class="<?php echo ($server['Server']['unpublish_event'] ? 'icon-ok' : 'icon-remove'); ?>" role="img" aria-label="<?php echo ($server['Server']['unpublish_event'] ? __('Yes') : __('No')); ?>"></span></td> <td class="short"><span class="<?php echo ($server['Server']['unpublish_event'] ? 'icon-ok' : 'icon-remove'); ?>" role="img" aria-label="<?php echo ($server['Server']['unpublish_event'] ? __('Yes') : __('No')); ?>"></span></td>
<td class="short"><span class="<?php echo ($server['Server']['publish_without_email'] ? 'icon-ok' : 'icon-remove'); ?>" role="img" aria-label="<?php echo ($server['Server']['publish_without_email'] ? __('Yes') : __('No')); ?>"></span></td> <td class="short"><span class="<?php echo ($server['Server']['publish_without_email'] ? 'icon-ok' : 'icon-remove'); ?>" role="img" aria-label="<?php echo ($server['Server']['publish_without_email'] ? __('Yes') : __('No')); ?>"></span></td>
<td><?php echo h($server['Server']['url']); ?>&nbsp;</td> <td><?php echo h($server['Server']['url']); ?>&nbsp;</td>
<td><a href="/organisations/view/<?php echo h($server['RemoteOrg']['id']); ?>"><?php echo h($server['RemoteOrg']['name']); ?></a></td> <td><a href="<?php echo $baseurl . "/organisations/view/" . h($server['RemoteOrg']['id']); ?>"><?php echo h($server['RemoteOrg']['name']); ?></a></td>
<td class="short"><?php echo h($server['Server']['cert_file']); ?>&nbsp;</td> <td class="short"><?php echo h($server['Server']['cert_file']); ?>&nbsp;</td>
<td class="short"><?php echo h($server['Server']['client_cert_file']); ?>&nbsp;</td> <td class="short"><?php echo h($server['Server']['client_cert_file']); ?>&nbsp;</td>
<td class="short"><span class="<?php echo ($server['Server']['self_signed'] ? 'icon-ok' : 'icon-remove'); ?>" role="img" aria-label="<?php echo ($server['Server']['self_signed'] ? __('Yes') : __('No')); ?>"></span></td> <td class="short"><span class="<?php echo ($server['Server']['self_signed'] ? 'icon-ok' : 'icon-remove'); ?>" role="img" aria-label="<?php echo ($server['Server']['self_signed'] ? __('Yes') : __('No')); ?>"></span></td>
<td class="short"><span class="<?php echo ($server['Server']['skip_proxy'] ? 'icon-ok' : 'icon-remove'); ?>" role="img" aria-label="<?php echo ($server['Server']['skip_proxy'] ? __('Yes') : __('No')); ?>"></span></td> <td class="short"><span class="<?php echo ($server['Server']['skip_proxy'] ? 'icon-ok' : 'icon-remove'); ?>" role="img" aria-label="<?php echo ($server['Server']['skip_proxy'] ? __('Yes') : __('No')); ?>"></span></td>
<td class="short"><a href="/organisations/view/<?php echo h($server['Organisation']['id']); ?>"><?php echo h($server['Organisation']['name']); ?></a></td> <td class="short"><a href="<?php echo $baseurl . "/organisations/view/" . h($server['Organisation']['id']); ?>"><?php echo h($server['Organisation']['name']); ?></a></td>
<td class="short action-links"> <td class="short action-links">
<?php <?php
echo sprintf('<a href="%s" title="%s" aria-label="%s" class="%s"></a>', $baseurl . '/servers/previewIndex/' . h($server['Server']['id']), __('Explore'), __('Explore'), 'fa fa-search'); echo sprintf('<a href="%s" title="%s" aria-label="%s" class="%s"></a>', $baseurl . '/servers/previewIndex/' . h($server['Server']['id']), __('Explore'), __('Explore'), 'fa fa-search');

View File

@ -28,7 +28,7 @@
<dd class="eventTagContainer"> <dd class="eventTagContainer">
<?php if (!empty($event['Tag'])) foreach ($event['Tag'] as $tag): ?> <?php if (!empty($event['Tag'])) foreach ($event['Tag'] as $tag): ?>
<span style="padding-right:0px;"> <span style="padding-right:0px;">
<span role="button" tabindex="0" aria-label="<?php echo __('Filter the remote instance by tag: %s', h($tag['name']));?>" title="<?php echo __('Filter the remote instance on the tag: %s', h($tag['name'])); ?>" onclick="document.location.href='/servers/previewIndex/<?php echo h($server['Server']['id']); ?>/searchtag:<?php echo h($tag['name']); ?>';" class="tagFirstHalf" style="background-color:<?php echo h($tag['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['colour']);?>"><?php echo h($tag['name']); ?></span> <span role="button" tabindex="0" aria-label="<?php echo __('Filter the remote instance by tag: %s', h($tag['name']));?>" title="<?php echo __('Filter the remote instance on the tag: %s', h($tag['name'])); ?>" onclick="document.location.href='<?php echo $baseurl . "/servers/previewIndex/" . h($server['Server']['id']); ?>/searchtag:<?php echo h($tag['name']); ?>';" class="tagFirstHalf" style="background-color:<?php echo h($tag['colour']);?>;color:<?php echo $this->TextColour->getTextColour($tag['colour']);?>"><?php echo h($tag['name']); ?></span>
</span> </span>
<?php endforeach; ?>&nbsp; <?php endforeach; ?>&nbsp;
</dd> </dd>

View File

@ -4,7 +4,7 @@
<div class="pagination"> <div class="pagination">
<ul> <ul>
<?php <?php
$eventViewURL = '/servers/previewEvent/' . h($id) . '/'; $eventViewURL = $baseurl . '/servers/previewEvent/' . h($id) . '/';
$this->Paginator->options(array( $this->Paginator->options(array(
'url' => $id, 'url' => $id,
'update' => '.span12', 'update' => '.span12',
@ -53,7 +53,7 @@
), ),
array( array(
'requirement' => count($passedArgsArray) > 0, 'requirement' => count($passedArgsArray) > 0,
'url' => '/servers/previewIndex/' . h($server['Server']['id']), 'url' => $baseurl . '/servers/previewIndex/' . h($server['Server']['id']),
'title' => __('Remove filters'), 'title' => __('Remove filters'),
'fa-icon' => 'times' 'fa-icon' => 'times'
) )
@ -170,7 +170,7 @@
?> ?>
</td> </td>
<td class="short action-links"> <td class="short action-links">
<?php if ($event['Event']['published']) echo $this->Form->postLink('', '/servers/pull/' . $server['Server']['id'] . '/' . $event['Event']['id'], array('class' => 'fa fa-arrow-circle-down', 'title' => __('Fetch the event')), __('Are you sure you want to fetch and save this event on your instance?', $this->Form->value('Server.id'))); ?> <?php if ($event['Event']['published']) echo $this->Form->postLink('', $baseurl . '/servers/pull/' . $server['Server']['id'] . '/' . $event['Event']['id'], array('class' => 'fa fa-arrow-circle-down', 'title' => __('Fetch the event')), __('Are you sure you want to fetch and save this event on your instance?', $this->Form->value('Server.id'))); ?>
<a href='<?php echo $eventViewURL . h($event['Event']['id']);?>' class = "fa fa-eye" title = "<?php echo __('View');?>"></a> <a href='<?php echo $eventViewURL . h($event['Event']['id']);?>' class = "fa fa-eye" title = "<?php echo __('View');?>"></a>
</td> </td>
</tr> </tr>

View File

@ -11,12 +11,12 @@
array( array(
'text' => __('My Org\'s Events'), 'text' => __('My Org\'s Events'),
'active' => !$all, 'active' => !$all,
'url' => '/shadow_attributes/index/all:0' 'url' => $baseurl . '/shadow_attributes/index/all:0'
), ),
array( array(
'text' => __('All Events'), 'text' => __('All Events'),
'active' => $all, 'active' => $all,
'url' => '/shadow_attributes/index/all:1' 'url' => $baseurl . '/shadow_attributes/index/all:1'
) )
) )
), ),

View File

@ -22,12 +22,12 @@
array( array(
'children' => array( 'children' => array(
array( array(
'url' => '/sharing_groups/index', 'url' => $baseurl . '/sharing_groups/index',
'text' => __('Active Sharing Groups'), 'text' => __('Active Sharing Groups'),
'active' => !$passive 'active' => !$passive
), ),
array( array(
'url' => '/sharing_groups/index/true', 'url' => $baseurl . '/sharing_groups/index/true',
'text' => __('Passive Sharing Groups'), 'text' => __('Passive Sharing Groups'),
'active' => $passive 'active' => $passive
) )
@ -54,7 +54,7 @@ foreach ($sharingGroups as $k => $sharingGroup):
<td class="short"><?php echo h($sharingGroup['SharingGroup']['id']); ?></td> <td class="short"><?php echo h($sharingGroup['SharingGroup']['id']); ?></td>
<td class="short"><?php echo h($sharingGroup['SharingGroup']['uuid']); ?></td> <td class="short"><?php echo h($sharingGroup['SharingGroup']['uuid']); ?></td>
<td class="short"><?php echo h($sharingGroup['SharingGroup']['name']); ?></td> <td class="short"><?php echo h($sharingGroup['SharingGroup']['name']); ?></td>
<td class="short"><a href="/organisations/view/<?php echo h($sharingGroup['Organisation']['id']);?>"><?php echo h($sharingGroup['Organisation']['name']); ?></a></td> <td class="short"><a href="<?php echo $baseurl; ?>/organisations/view/<?php echo h($sharingGroup['Organisation']['id']);?>"><?php echo h($sharingGroup['Organisation']['name']); ?></a></td>
<td><?php echo h($sharingGroup['SharingGroup']['description']); ?></td> <td><?php echo h($sharingGroup['SharingGroup']['description']); ?></td>
<?php <?php
$combined = ""; $combined = "";
@ -62,7 +62,7 @@ foreach ($sharingGroups as $k => $sharingGroup):
if (count($sharingGroup['SharingGroupOrg']) == 0) $combined .= "<br />N/A"; if (count($sharingGroup['SharingGroupOrg']) == 0) $combined .= "<br />N/A";
foreach ($sharingGroup['SharingGroupOrg'] as $k2 => $sge) { foreach ($sharingGroup['SharingGroupOrg'] as $k2 => $sge) {
if (!empty($sge['Organisation'])) { if (!empty($sge['Organisation'])) {
$combined .= "<br /><a href='/Organisation/view/" . h($sge['Organisation']['id']) . "'>" . h($sge['Organisation']['name']) . "</a>"; $combined .= "<br /><a href='" . $baseurl . "/Organisation/view/" . h($sge['Organisation']['id']) . "'>" . h($sge['Organisation']['name']) . "</a>";
if ($sge['extend']) $combined .= (' (can extend)'); if ($sge['extend']) $combined .= (' (can extend)');
} }
} }
@ -70,7 +70,7 @@ foreach ($sharingGroups as $k => $sharingGroup):
if (count($sharingGroup['SharingGroupServer']) == 0) $combined .= "<br />N/A"; if (count($sharingGroup['SharingGroupServer']) == 0) $combined .= "<br />N/A";
foreach ($sharingGroup['SharingGroupServer'] as $k3 => $sgs) { foreach ($sharingGroup['SharingGroupServer'] as $k3 => $sgs) {
if ($sgs['server_id'] != 0) { if ($sgs['server_id'] != 0) {
$combined .= "<br /><a href='/Server/view/" . h($sgs['Server']['id']) . "'>" . h($sgs['Server']['name']) . "</a>"; $combined .= "<br /><a href='" . $baseurl . "/Server/view/" . h($sgs['Server']['id']) . "'>" . h($sgs['Server']['name']) . "</a>";
} else { } else {
$combined .= "<br />This instance"; $combined .= "<br />This instance";
} }
@ -88,7 +88,7 @@ foreach ($sharingGroups as $k => $sharingGroup):
<?php echo $this->Html->link('', '/SharingGroups/edit/' . $sharingGroup['SharingGroup']['id'], array('class' => 'black fa fa-edit', 'title' => __('Edit'), 'aria-label' => __('Edit'))); ?> <?php echo $this->Html->link('', '/SharingGroups/edit/' . $sharingGroup['SharingGroup']['id'], array('class' => 'black fa fa-edit', 'title' => __('Edit'), 'aria-label' => __('Edit'))); ?>
<?php echo $this->Form->postLink('', '/SharingGroups/delete/' . $sharingGroup['SharingGroup']['id'], array('class' => 'black fa fa-trash', 'title' => __('Delete'), 'aria-label' => __('Delete')), __('Are you sure you want to delete %s?', h($sharingGroup['SharingGroup']['name']))); ?> <?php echo $this->Form->postLink('', '/SharingGroups/delete/' . $sharingGroup['SharingGroup']['id'], array('class' => 'black fa fa-trash', 'title' => __('Delete'), 'aria-label' => __('Delete')), __('Are you sure you want to delete %s?', h($sharingGroup['SharingGroup']['name']))); ?>
<?php endif; ?> <?php endif; ?>
<a href="/sharing_groups/view/<?php echo $sharingGroup['SharingGroup']['id']; ?>" class="black fa fa-eye" title="<?php echo __('View');?>" aria-label="<?php echo __('View');?>"></a> <a href="<?php echo $baseurl; ?>/sharing_groups/view/<?php echo $sharingGroup['SharingGroup']['id']; ?>" class="black fa fa-eye" title="<?php echo __('View');?>" aria-label="<?php echo __('View');?>"></a>
</td> </td>
</tr> </tr>
<?php <?php

View File

@ -21,12 +21,12 @@
endforeach; endforeach;
?> ?>
<dt><?php echo __('Created by');?></dt> <dt><?php echo __('Created by');?></dt>
<dd><a href="/organisations/view/<?php echo $sg['Organisation']['id']; ?>"><?php echo h($sg['Organisation']['name']); ?></a></dd> <dd><a href="<?php echo $baseurl; ?>/organisations/view/<?php echo $sg['Organisation']['id']; ?>"><?php echo h($sg['Organisation']['name']); ?></a></dd>
<?php <?php
if ($sg['SharingGroup']['sync_user_id']): if ($sg['SharingGroup']['sync_user_id']):
?> ?>
<dt><?php echo __('Synced by');?></dt> <dt><?php echo __('Synced by');?></dt>
<dd><a href="/organisations/view/<?php echo $sg['Organisation']['id']; ?>"><?php echo h($sg['Organisation']['name']); ?></a></dd> <dd><a href="<?php echo $baseurl; ?>/organisations/view/<?php echo $sg['Organisation']['id']; ?>"><?php echo h($sg['Organisation']['name']); ?></a></dd>
<?php <?php
endif; endif;
?> ?>
@ -47,7 +47,7 @@
foreach ($sg['SharingGroupOrg'] as $sgo): foreach ($sg['SharingGroupOrg'] as $sgo):
?> ?>
<tr> <tr>
<td><a href="/organisations/view/<?php echo h($sgo['Organisation']['id']); ?>"><?php echo h($sgo['Organisation']['name']); ?></a></td> <td><a href="<?php echo $baseurl; ?>/organisations/view/<?php echo h($sgo['Organisation']['id']); ?>"><?php echo h($sgo['Organisation']['name']); ?></a></td>
<td><span class="<?php echo ($sgo['Organisation']['local'] ? 'icon-ok' : 'icon-remove'); ?>"></span></td> <td><span class="<?php echo ($sgo['Organisation']['local'] ? 'icon-ok' : 'icon-remove'); ?>"></span></td>
<td><span class="<?php echo ($sgo['extend'] ? 'icon-ok' : 'icon-remove'); ?>"></span></td> <td><span class="<?php echo ($sgo['extend'] ? 'icon-ok' : 'icon-remove'); ?>"></span></td>
</tr> </tr>

View File

@ -1,7 +1,7 @@
<h3>Add Sighting</h3> <h3>Add Sighting</h3>
<div id="sightingsEventId" class="hidden" data-event-id="<?php echo h($event_id); ?>"></div> <div id="sightingsEventId" class="hidden" data-event-id="<?php echo h($event_id); ?>"></div>
<?php <?php
echo $this->Form->create('Sighting', array('id', 'url' => '/sightings/add/' . urlencode(h($id)), 'style' => 'margin-bottom:0px;')); echo $this->Form->create('Sighting', array('id', 'url' => $baseurl . '/sightings/add/' . urlencode(h($id)), 'style' => 'margin-bottom:0px;'));
echo $this->Form->input('type', array( echo $this->Form->input('type', array(
'options' => array('Sighting', 'False-positive', 'Expiration'), 'options' => array('Sighting', 'False-positive', 'Expiration'),
'default' => 0, 'default' => 0,

View File

@ -50,13 +50,13 @@ $('.sightingsToggle').click(function() {
if (type == 'graph') { if (type == 'graph') {
loadSightingGraph(id, object_context); loadSightingGraph(id, object_context);
} else if (type == 'add') { } else if (type == 'add') {
$.get( "/sightings/add/" + id, function(data) { $.get("<?php echo $baseurl; ?>/sightings/add/" + id, function(data) {
$("#sightingsData").html(data); $("#sightingsData").html(data);
}); });
} else { } else {
var org = ""; var org = "";
if (type == 'org') org = "/<?php echo h($me['org_id']);?>" if (type == 'org') org = "/<?php echo h($me['org_id']);?>"
$.get( "/sightings/listSightings/" + id + "/" + object_context + org, function(data) { $.get("<?php echo $baseurl; ?>/sightings/listSightings/" + id + "/" + object_context + org, function(data) {
$("#sightingsData").html(data); $("#sightingsData").html(data);
}); });
} }

View File

@ -1,4 +1,4 @@
<?php <?php
echo $this->Form->create('Sighting', array('id' => 'Sighting_' . $id, 'url' => '/sightings/add/' . $id, 'style' => 'display:none;')); echo $this->Form->create('Sighting', array('id' => 'Sighting_' . $id, 'url' => $baseurl . '/sightings/add/' . $id, 'style' => 'display:none;'));
echo $this->Form->end(); echo $this->Form->end();
?> ?>

View File

@ -1,6 +1,6 @@
<div class="confirmation"> <div class="confirmation">
<?php <?php
echo $this->Form->create('Sighting', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/sightings/add/' . $id)); echo $this->Form->create('Sighting', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => $baseurl . '/sightings/add/' . $id));
?> ?>
<legend><?php echo __('Add Sighting');?></legend> <legend><?php echo __('Add Sighting');?></legend>
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;"> <div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">

View File

@ -1,6 +1,6 @@
<div class="confirmation"> <div class="confirmation">
<?php <?php
echo $this->Form->create('Sighting', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/sightings/quickDelete/' . $id . '/' . urlencode($rawId) . '/' . $context)); echo $this->Form->create('Sighting', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => $baseurl . '/sightings/quickDelete/' . $id . '/' . urlencode($rawId) . '/' . $context));
?> ?>
<legend><?php echo __('Remove Sighting');?></legend> <legend><?php echo __('Remove Sighting');?></legend>
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;"> <div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">

View File

@ -26,7 +26,7 @@
</div> </div>
<div id="hiddenFormDiv"> <div id="hiddenFormDiv">
<?php <?php
echo $this->Form->create('FavouriteTag', array('url' => '/favourite_tags/toggle')); echo $this->Form->create('FavouriteTag', array('url' => $baseurl . '/favourite_tags/toggle'));
echo $this->Form->input('data', array('label' => false, 'style' => 'display:none;')); echo $this->Form->input('data', array('label' => false, 'style' => 'display:none;'));
echo $this->Form->end(); echo $this->Form->end();
?> ?>

View File

@ -1,6 +1,6 @@
<div class="confirmation"> <div class="confirmation">
<?php <?php
echo $this->Form->create('Taxonomy', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/taxonomies/addTag')); echo $this->Form->create('Taxonomy', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => $baseurl . '/taxonomies/addTag'));
?> ?>
<div class="hidden"> <div class="hidden">
<?php <?php

View File

@ -1,6 +1,6 @@
<div class="confirmation"> <div class="confirmation">
<?php <?php
echo $this->Form->create('Taxonomy', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/taxonomies/hideTag')); echo $this->Form->create('Taxonomy', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => $baseurl . '/taxonomies/hideTag'));
?> ?>
<div class="hidden"> <div class="hidden">
<?php <?php
@ -34,4 +34,4 @@
<?php <?php
echo $this->Form->end(); echo $this->Form->end();
?> ?>
</div> </div>

View File

@ -1,6 +1,6 @@
<div class="confirmation"> <div class="confirmation">
<?php <?php
echo $this->Form->create('Taxonomy', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => '/taxonomies/unhideTag')); echo $this->Form->create('Taxonomy', array('style' => 'margin:0px;', 'id' => 'PromptForm', 'url' => $baseurl . '/taxonomies/unhideTag'));
?> ?>
<div class="hidden"> <div class="hidden">
<?php <?php
@ -34,4 +34,4 @@
<?php <?php
echo $this->Form->end(); echo $this->Form->end();
?> ?>
</div> </div>

View File

@ -3,7 +3,7 @@
'id' => 'RequiredCheckboxForm' . h($id), 'id' => 'RequiredCheckboxForm' . h($id),
'label' => false, 'label' => false,
'style' => 'display:none;', 'style' => 'display:none;',
'url' => '/taxonomies/toggleRequired/' . $id 'url' => $baseurl . '/taxonomies/toggleRequired/' . $id
)); ));
echo $this->Form->checkbox('required', array( echo $this->Form->checkbox('required', array(
'checked' => $required, 'checked' => $required,

View File

@ -150,12 +150,12 @@
<td class="action"> <td class="action">
<?php <?php
if ($isAclTagger && $taxonomy['enabled']) { if ($isAclTagger && $taxonomy['enabled']) {
echo $this->Form->create('Tag', array('id' => 'quick_' . h($k), 'url' => '/taxonomies/addTag/', 'style' => 'margin:0px;')); echo $this->Form->create('Tag', array('id' => 'quick_' . h($k), 'url' => $baseurl . '/taxonomies/addTag/', 'style' => 'margin:0px;'));
echo $this->Form->input('name', array('type' => 'hidden', 'value' => $item['tag'])); echo $this->Form->input('name', array('type' => 'hidden', 'value' => $item['tag']));
echo $this->Form->input('taxonomy_id', array('type' => 'hidden', 'value' => $taxonomy['id'])); echo $this->Form->input('taxonomy_id', array('type' => 'hidden', 'value' => $taxonomy['id']));
echo $this->Form->end(); echo $this->Form->end();
if ($item['existing_tag'] && !$item['existing_tag']['Tag']['hide_tag']): if ($item['existing_tag'] && !$item['existing_tag']['Tag']['hide_tag']):
echo $this->Form->create('Tag', array('id' => 'quick_disable_' . h($k), 'url' => '/taxonomies/disableTag/', 'style' => 'margin:0px;')); echo $this->Form->create('Tag', array('id' => 'quick_disable_' . h($k), 'url' => $baseurl . '/taxonomies/disableTag/', 'style' => 'margin:0px;'));
echo $this->Form->input('name', array('type' => 'hidden', 'value' => $item['tag'])); echo $this->Form->input('name', array('type' => 'hidden', 'value' => $item['tag']));
echo $this->Form->input('taxonomy_id', array('type' => 'hidden', 'value' => $taxonomy['id'])); echo $this->Form->input('taxonomy_id', array('type' => 'hidden', 'value' => $taxonomy['id']));
echo $this->Form->end(); echo $this->Form->end();

View File

@ -1,6 +1,6 @@
<div class="template_element_add_attribute"> <div class="template_element_add_attribute">
<?php <?php
echo $this->Form->create('TemplateElementAttribute', array('id', 'url' => '/templateElements/add/attribute/' . $id)); echo $this->Form->create('TemplateElementAttribute', array('id', 'url' => $baseurl . '/templateElements/add/attribute/' . $id));
?> ?>
<legend><?php echo __('Add Attribute Element To Template'); ?></legend> <legend><?php echo __('Add Attribute Element To Template'); ?></legend>
<fieldset> <fieldset>

View File

@ -1,6 +1,6 @@
<div class="template_element_add_file"> <div class="template_element_add_file">
<?php <?php
echo $this->Form->create('TemplateElementFile', array('id', 'url' => '/templateElements/add/file/' . $id)); echo $this->Form->create('TemplateElementFile', array('id', 'url' => $baseurl . '/templateElements/add/file/' . $id));
?> ?>
<legend><?php echo __('Add File Element To Template'); ?></legend> <legend><?php echo __('Add File Element To Template'); ?></legend>
<fieldset> <fieldset>

View File

@ -1,6 +1,6 @@
<div class="template_element_add_text"> <div class="template_element_add_text">
<?php <?php
echo $this->Form->create('TemplateElementText', array('url' => '/templateElements/add/text/' . $id)); echo $this->Form->create('TemplateElementText', array('url' => $baseurl . '/templateElements/add/text/' . $id));
?> ?>
<legend><?php echo __('Add Text Element To Template'); ?></legend> <legend><?php echo __('Add Text Element To Template'); ?></legend>
<fieldset> <fieldset>

View File

@ -1,6 +1,6 @@
<div class="template_element_add_attribute"> <div class="template_element_add_attribute">
<?php <?php
echo $this->Form->create('TemplateElementAttribute', array('id', 'url' => '/templateElements/edit/attribute/' . $id)); echo $this->Form->create('TemplateElementAttribute', array('id', 'url' => $baseurl . '/templateElements/edit/attribute/' . $id));
?> ?>
<legend><?php echo __('Edit Attribute Element'); ?></legend> <legend><?php echo __('Edit Attribute Element'); ?></legend>
<fieldset> <fieldset>

View File

@ -1,6 +1,6 @@
<div class="template_element_add_file"> <div class="template_element_add_file">
<?php <?php
echo $this->Form->create('TemplateElementFile', array('id', 'url' => '/templateElements/edit/file/' . $id)); echo $this->Form->create('TemplateElementFile', array('id', 'url' => $baseurl . '/templateElements/edit/file/' . $id));
?> ?>
<legend><?php echo __('Edit File Element'); ?></legend> <legend><?php echo __('Edit File Element'); ?></legend>
<fieldset> <fieldset>

View File

@ -1,6 +1,6 @@
<div class="template_element_add_text"> <div class="template_element_add_text">
<?php <?php
echo $this->Form->create('TemplateElementText', array('id', 'url' => '/templateElements/edit/text/' . $id)); echo $this->Form->create('TemplateElementText', array('id', 'url' => $baseurl . '/templateElements/edit/text/' . $id));
?> ?>
<legend><?php echo __('Add Text Element To Template'); ?></legend> <legend><?php echo __('Add Text Element To Template'); ?></legend>
<fieldset> <fieldset>

View File

@ -22,7 +22,7 @@ foreach ($attributes as $item):?>
endforeach;?> endforeach;?>
</table> </table>
<div style="float:left;"> <div style="float:left;">
<?php echo $this->Form->create('Template', array('url' => '/templates/submitEventPopulation/' . $template_id . '/' . $event_id));?> <?php echo $this->Form->create('Template', array('url' => $baseurl . '/templates/submitEventPopulation/' . $template_id . '/' . $event_id));?>
<fieldset> <fieldset>
<?php <?php
echo $this->Form->input('attributes', array( echo $this->Form->input('attributes', array(

View File

@ -28,13 +28,12 @@
<th><?php echo __('Actions');?></th> <th><?php echo __('Actions');?></th>
</tr> </tr>
<?php <?php
$url = Configure::read('MISP.baseurl');
foreach ($threads as $thread): foreach ($threads as $thread):
$lastPost = end($thread['Post']); $lastPost = end($thread['Post']);
?> ?>
<tr> <tr>
<td class="short" style="text-align: left;" ondblclick="document.location.href ='<?php echo $url;?>/threads/view/<?php echo $thread['Thread']['id'];?>'"> <td class="short" style="text-align: left;" ondblclick="document.location.href ='<?php echo $baseurl;?>/threads/view/<?php echo $thread['Thread']['id'];?>'">
<?php <?php
$imgRelativePath = 'orgs' . DS . h($thread['Organisation']['name']) . '.png'; $imgRelativePath = 'orgs' . DS . h($thread['Organisation']['name']) . '.png';
$imgAbsolutePath = APP . WEBROOT_DIR . DS . 'img' . DS . $imgRelativePath; $imgAbsolutePath = APP . WEBROOT_DIR . DS . 'img' . DS . $imgRelativePath;
@ -43,37 +42,37 @@ foreach ($threads as $thread):
?> ?>
&nbsp; &nbsp;
</td> </td>
<td ondblclick="document.location.href ='<?php echo $url;?>/threads/view/<?php echo $thread['Thread']['id'];?>'"> <td ondblclick="document.location.href ='<?php echo $baseurl;?>/threads/view/<?php echo $thread['Thread']['id'];?>'">
<?php <?php
echo h($thread['Thread']['title']); echo h($thread['Thread']['title']);
?> ?>
</td> </td>
<td class="short" style="text-align: center;" ondblclick="document.location.href ='<?php echo $url;?>/threads/view/<?php echo $thread['Thread']['id'];?>'"> <td class="short" style="text-align: center;" ondblclick="document.location.href ='<?php echo $baseurl;?>/threads/view/<?php echo $thread['Thread']['id'];?>'">
<?php <?php
echo h($thread['Thread']['date_modified']); echo h($thread['Thread']['date_modified']);
?> ?>
&nbsp; &nbsp;
</td> </td>
<td class="short" style="text-align: center;" ondblclick="document.location.href ='<?php echo $url;?>/threads/view/<?php echo $thread['Thread']['id'];?>'"> <td class="short" style="text-align: center;" ondblclick="document.location.href ='<?php echo $baseurl;?>/threads/view/<?php echo $thread['Thread']['id'];?>'">
<?php <?php
echo isset($lastPost['User']['email']) ? h($lastPost['User']['email']) : ''; echo isset($lastPost['User']['email']) ? h($lastPost['User']['email']) : '';
?> ?>
&nbsp; &nbsp;
</td> </td>
<td class="short" style="text-align: center;" ondblclick="document.location.href ='<?php echo $url;?>/threads/view/<?php echo $thread['Thread']['id'];?>'"> <td class="short" style="text-align: center;" ondblclick="document.location.href ='<?php echo $baseurl;?>/threads/view/<?php echo $thread['Thread']['id'];?>'">
<?php <?php
echo h($thread['Thread']['date_created']); echo h($thread['Thread']['date_created']);
?> ?>
</td> </td>
<td class="short" ondblclick="document.location.href ='<?php echo $url;?>/threads/view/<?php echo $thread['Thread']['id'];?>'"> <td class="short" ondblclick="document.location.href ='<?php echo $baseurl;?>/threads/view/<?php echo $thread['Thread']['id'];?>'">
<?php <?php
echo h($thread['Thread']['post_count']); echo h($thread['Thread']['post_count']);
?> ?>
</td> </td>
<td class="short" ondblclick="document.location.href ='<?php echo $url;?>/threads/view/<?php echo $thread['Thread']['id'];?>'"> <td class="short" ondblclick="document.location.href ='<?php echo $baseurl;?>/threads/view/<?php echo $thread['Thread']['id'];?>'">
<?php <?php
if ($thread['Thread']['distribution'] < 4) echo $distributionLevels[$thread['Thread']['distribution']]; if ($thread['Thread']['distribution'] < 4) echo $distributionLevels[$thread['Thread']['distribution']];
else echo '<a href="/sharing_groups/view/' . h($thread['Thread']['sharing_group_id']) . '" title="' . h($thread['SharingGroup']['name']) . '">Sharing group</a>'; else echo '<a href="' . $baseurl . '/sharing_groups/view/' . h($thread['Thread']['sharing_group_id']) . '" title="' . h($thread['SharingGroup']['name']) . '">Sharing group</a>';
?> ?>
</td> </td>
<td class="short action-links"> <td class="short action-links">

View File

@ -139,7 +139,7 @@
array( array(
'name' => __('Monitored'), 'name' => __('Monitored'),
'element' => 'toggle', 'element' => 'toggle',
'url' => '/admin/users/monitor', 'url' => $baseurl . '/admin/users/monitor',
'url_params_data_paths' => array( 'url_params_data_paths' => array(
'User.id' 'User.id'
), ),
@ -183,17 +183,23 @@
$options['isSiteAdmin'] $options['isSiteAdmin']
); );
} }
array(
'requirement' => count($passedArgsArray) > 0,
'url' => $baseurl . '/admin/users/index',
'title' => __('Remove filters'),
'fa-icon' => 'times'
)
) )
), ),
array( array(
'url' => '/admin/users/edit', 'url' => $baseurl . '/admin/users/edit',
'url_params_data_paths' => array( 'url_params_data_paths' => array(
'User.id' 'User.id'
), ),
'icon' => 'edit' 'icon' => 'edit'
), ),
array( array(
'url' => '/admin/users/delete', 'url' => $baseurl . '/admin/users/delete',
'url_params_data_paths' => array( 'url_params_data_paths' => array(
'User.id' 'User.id'
), ),
@ -202,7 +208,7 @@
'icon' => 'trash' 'icon' => 'trash'
), ),
array( array(
'url' => '/admin/users/view', 'url' => $baseurl . '/admin/users/view',
'url_params_data_paths' => array( 'url_params_data_paths' => array(
'User.id' 'User.id'
), ),

View File

@ -19,7 +19,7 @@
<?php if (Configure::read('MISP.main_logo') && file_exists(APP . '/webroot/img/custom/' . Configure::read('MISP.main_logo'))): ?> <?php if (Configure::read('MISP.main_logo') && file_exists(APP . '/webroot/img/custom/' . Configure::read('MISP.main_logo'))): ?>
<img src="<?php echo $baseurl?>/img/custom/<?php echo h(Configure::read('MISP.main_logo'));?>" style=" display:block; margin-left: auto; margin-right: auto;" /> <img src="<?php echo $baseurl?>/img/custom/<?php echo h(Configure::read('MISP.main_logo'));?>" style=" display:block; margin-left: auto; margin-right: auto;" />
<?php else: ?> <?php else: ?>
<img src="/img/misp-logo.png" style="display:block; margin-left: auto; margin-right: auto;"/> <img src="<?php echo $baseurl?>/img/misp-logo.png" style="display:block; margin-left: auto; margin-right: auto;"/>
<?php endif;?> <?php endif;?>
</div> </div>
<?php <?php

Some files were not shown because too many files have changed in this diff Show More