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

View File

@ -1529,7 +1529,7 @@ class EventsController extends AppController
}
$this->set('contributors', $contributors);
$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) {
if (!is_numeric($k)) {
if (is_array($v)) {
@ -1989,7 +1989,7 @@ class EventsController extends AppController
} else {
if ($this->_isRest()) { // TODO return error if REST
if (is_numeric($add)) {
$this->response->header('Location', Configure::read('MISP.baseurl') . '/events/' . $add);
$this->response->header('Location', $baseurl . '/events/' . $add);
$this->response->send();
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)) {
$this->set('errors', $errors);
}
$this->set('url', '/events/publishSightings/' . $id);
$this->set('url', $baseurl . '/events/publishSightings/' . $id);
$this->set('id', $id);
$this->set('_serialize', array('name', 'message', 'url', 'id', 'errors'));
} else {
@ -2673,7 +2673,7 @@ class EventsController extends AppController
if (!empty($errors)) {
$this->set('errors', $errors);
}
$this->set('url', '/events/alert/' . $id);
$this->set('url', $baseurl . '/events/alert/' . $id);
$this->set('id', $id);
$this->set('_serialize', array('name', 'message', 'url', 'id', 'errors'));
} else {
@ -2758,7 +2758,7 @@ class EventsController extends AppController
if (!empty($errors)) {
$this->set('errors', $errors);
}
$this->set('url', '/events/alert/' . $id);
$this->set('url', $baseurl . '/events/alert/' . $id);
$this->set('id', $id);
$this->set('_serialize', array('name', 'message', 'url', 'id', 'errors'));
} else {
@ -3946,89 +3946,89 @@ class EventsController extends AppController
// #TODO i18n
$exports = array(
'xml' => array(
'url' => '/events/restSearch/xml/eventid:' . $id . '.xml',
'url' => $baseurl . '/events/restSearch/xml/eventid:' . $id . '.xml',
'text' => 'MISP XML (metadata + all attributes)',
'requiresPublished' => false,
'checkbox' => true,
'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
),
'json' => array(
'url' => '/events/restSearch/json/eventid:' . $id . '.json',
'url' => $baseurl . '/events/restSearch/json/eventid:' . $id . '.json',
'text' => 'MISP JSON (metadata + all attributes)',
'requiresPublished' => false,
'checkbox' => true,
'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
),
'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)',
'requiresPublished' => false,
'checkbox' => false,
),
'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',
'requiresPublished' => false,
'checkbox' => true,
'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(
'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',
'requiresPublished' => false,
'checkbox' => true,
'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(
'url' => '/events/restSearch/stix/eventid:' . $id,
'url' => $baseurl . '/events/restSearch/stix/eventid:' . $id,
'text' => 'STIX XML (metadata + all attributes)',
'requiresPublished' => false,
'checkbox' => true,
'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(
'url' => '/events/restSearch/stix-json/eventid:' . $id,
'url' => $baseurl . '/events/restSearch/stix-json/eventid:' . $id,
'text' => 'STIX JSON (metadata + all attributes)',
'requiresPublished' => false,
'checkbox' => true,
'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(
'url' => '/events/restSearch/stix2/eventid:' . $id,
'url' => $baseurl . '/events/restSearch/stix2/eventid:' . $id,
'text' => 'STIX2 (requires the STIX 2 library)',
'requiresPublished' => false,
'checkbox' => true,
'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(
'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',
'requiresPublished' => false,
'checkbox' => false,
),
'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',
'requiresPublished' => false,
'checkbox' => false,
),
'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',
'requiresPublished' => false,
'checkbox' => false,
),
'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,
'text' => 'Download Bro rules',
'requiresPublished' => false,
@ -4036,11 +4036,11 @@ class EventsController extends AppController
),
'text' => array(
'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,
'checkbox' => true,
'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) {
@ -4050,7 +4050,7 @@ class EventsController extends AppController
}
}
$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)',
'requiresPublished' => false,
'checkbox' => false
@ -4061,7 +4061,7 @@ class EventsController extends AppController
if (is_array($modules) && !empty($modules)) {
foreach ($modules['modules'] as $module) {
$exports[$module['name']] = array(
'url' => '/events/exportModule/' . $module['name'] . '/' . $id,
'url' => $baseurl . '/events/exportModule/' . $module['name'] . '/' . $id,
'text' => Inflector::humanize($module['name']),
'requiresPublished' => true,
'checkbox' => false,
@ -4085,29 +4085,31 @@ class EventsController extends AppController
}
$imports = array(
'freetext' => array(
'url' => '/events/freeTextImport/' . $id,
'url' => $baseurl . '/events/freeTextImport/' . $id,
'text' => __('Freetext Import'),
'ajax' => true,
'target' => 'popover_form'
),
'template' => array(
'url' => '/templates/templateChoices/' . $id,
'url' => $baseurl . '/templates/templateChoices/' . $id,
'text' => __('Populate using a Template'),
'ajax' => true,
'target' => 'popover_form'
),
'OpenIOC' => array(
'url' => '/events/addIOC/' . $id,
'url' => $baseurl . '/events/addIOC/' . $id,
'text' => __('OpenIOC Import'),
'url' => $baseurl . '/events/addIOC/' . $id,
'text' => 'OpenIOC Import',
'ajax' => false,
),
'ThreatConnect' => array(
'url' => '/attributes/add_threatconnect/' . $id,
'url' => $baseurl . '/attributes/add_threatconnect/' . $id,
'text' => __('ThreatConnect Import'),
'ajax' => false
),
'Forensic analysis' => array(
'url' => '/events/upload_analysis_file/'.$id,
'url' => $baseurl . '/events/upload_analysis_file/'.$id,
'text' => __('(Experimental) Forensic analysis - Mactime'),
'ajax' => false,
)
@ -4117,7 +4119,7 @@ class EventsController extends AppController
if (is_array($modules) && !empty($modules)) {
foreach ($modules['modules'] as $k => $module) {
$imports[$module['name']] = array(
'url' => '/events/importModule/' . $module['name'] . '/' . $id,
'url' => $baseurl . '/events/importModule/' . $module['name'] . '/' . $id,
'text' => Inflector::humanize($module['name']),
'ajax' => false
);
@ -4126,18 +4128,18 @@ class EventsController extends AppController
} else {
$imports = array(
'MISP' => array(
'url' => '/events/add_misp_export',
'url' => $baseurl . '/events/add_misp_export',
'text' => __('MISP standard (recommended exchange format - lossless)'),
'ajax' => false,
'bold' => true
),
'STIX' => array(
'url' => '/events/upload_stix',
'url' => $baseurl . '/events/upload_stix',
'text' => __('STIX 1.1.1 format (lossy)'),
'ajax' => false,
),
'STIX2' => array(
'url' => '/events/upload_stix/2',
'url' => $baseurl . '/events/upload_stix/2',
'text' => __('STIX 2.0 format (lossy)'),
'ajax' => false,
)
@ -4358,7 +4360,7 @@ class EventsController extends AppController
if ($successCount > 0) {
$this->set('name', 'Partial success');
$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('_serialize', array('name', 'message', 'url', 'id', 'errors'));
} else {
@ -4369,7 +4371,7 @@ class EventsController extends AppController
} else {
$this->set('name', 'Success');
$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('_serialize', array('name', 'message', 'url', 'id'));
}

View File

@ -155,14 +155,14 @@ class GalaxiesController extends AppController
$items = array(
array(
'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) {
if (!isset($galaxy['Galaxy']['kill_chain_order'])) {
$items[] = array(
'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(
'preIcon' => 'fa-' . $galaxy['Galaxy']['icon'],
'name' => $galaxy['Galaxy']['name'],
@ -183,7 +183,7 @@ class GalaxiesController extends AppController
'isMatrix' => true
);
if ($galaxy['Galaxy']['id'] == $mitreAttackGalaxyId) {
$param['img'] = "/img/mitre-attack-icon.ico";
$param['img'] = $baseurl . "/img/mitre-attack-icon.ico";
}
$items[] = $param;
}
@ -205,12 +205,12 @@ class GalaxiesController extends AppController
$items = array();
$items[] = array(
'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) {
$items[] = array(
'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(
'name' => __('All Objects'),
'value' => "/ObjectTemplates/objectChoice/" . h($event_id) . "/" . "0"
'value' => $baseurl . "/ObjectTemplates/objectChoice/" . h($event_id) . "/" . "0"
);
foreach($metas as $meta) {
$items[] = array(
'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,
'exitOnError' => false,
'requirements' => '',
'url' => '/'
'url' => $baseurl . '/'
);
foreach($actions as $id => $action) {
foreach($default_fields as $field => $value) {

View File

@ -171,7 +171,7 @@ class ShadowAttributesController extends AppController
$response['check_publish'] = true;
$this->set('name', $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'));
} else {
throw new MethodNotAllowedException($response['errors']);
@ -223,7 +223,7 @@ class ShadowAttributesController extends AppController
if ($this->_isRest()) {
$this->set('name', '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'));
} else {
$this->autoRender = false;
@ -865,7 +865,7 @@ class ShadowAttributesController extends AppController
$conditions['AND'][] = array(
'ShadowAttribute.deleted' => $this->request['named']['deleted']
);
}
}
if (!empty($this->request['named']['timestamp'])) {
$conditions['AND'][] = array(
'ShadowAttribute.timestamp >=' => $this->request['named']['timestamp']

View File

@ -364,7 +364,7 @@ class TagsController extends AppController
if ($this->_isRest()) {
$this->set('name', '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->Flash->success(__('Tag deleted'));
@ -574,22 +574,22 @@ class TagsController extends AppController
if ($favourites) {
$items[] = array(
'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') {
$items[] = array(
'name' => __('Tag Collections'),
'value' => "/tags/selectTag/" . h($id) . "/collections/" . h($scope) . $localFlag
'value' => $baseurl . "/tags/selectTag/" . h($id) . "/collections/" . h($scope) . $localFlag
);
}
$items[] = array(
'name' => __('Custom Tags'),
'value' => "/tags/selectTag/" . h($id) . "/0/" . h($scope) . $localFlag
'value' => $baseurl . "/tags/selectTag/" . h($id) . "/0/" . h($scope) . $localFlag
);
$items[] = array(
'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');
@ -597,7 +597,7 @@ class TagsController extends AppController
foreach ($options as $k => $option) {
$items[] = array(
'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);

View File

@ -181,7 +181,7 @@ class Server extends AppModel
'branch' => 1,
'baseurl' => array(
'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' => '',
'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',
@ -3568,7 +3568,10 @@ class Server extends AppModel
if ($this->testForEmpty($value) !== true) {
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 true;

View File

@ -1,5 +1,5 @@
<?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-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
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-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
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-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">
<?php
echo $this->Form->create('Attribute', array('url' => '/attributes/editSelected/' . $id));
echo $this->Form->create('Attribute', array('url' => $baseurl . '/attributes/editSelected/' . $id));
?>
<fieldset>
<legend><?php echo __('Mass Edit Attributes'); ?></legend>

View File

@ -1,6 +1,6 @@
<div class="confirmation">
<?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(
'options' => array(0 => 'No', 1 => 'Yes'),
'label' => false,

View File

@ -1,5 +1,5 @@
<?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-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
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-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">
<?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) . "');";
?>
<legend><?php echo __('Remove Tag'); ?></legend>

View File

@ -1,6 +1,6 @@
<div class="confirmation">
<?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 = "";
?>
<legend><?php echo __('Toggle Correlation %s ', $attribute['Attribute']['disable_correlation'] ? __('on') : __('off'));?></legend>

View File

@ -1,6 +1,6 @@
<div class="attribute_replace">
<?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>
<legend><?php echo __('Attribute Replace Tool'); ?></legend>

View File

@ -503,7 +503,7 @@ function cleanRules(rules) {
function performQuery(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({
type:"post",
url: url,

View File

@ -338,7 +338,7 @@
<?php
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
else:
echo h($shortDist[$object['distribution']]);

View File

@ -107,7 +107,7 @@
if ($object['objectType'] == 0) {
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
else:
echo h($shortDist[$object['distribution']]);

View File

@ -25,7 +25,7 @@
<?php
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
endif;
?>

View File

@ -188,7 +188,7 @@
<td class="short action-links">
<?php
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();
?>
<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">
<?php
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();
?>
<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">
<span id="sightingForm_<?php echo h($object['id']);?>">
<?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->end();
?>

View File

@ -102,7 +102,7 @@
</ul>
</div>
<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 deleted = <?php echo (isset($deleted) && $deleted) ? 'true' : 'false';?>;
$(document).ready(function() {

View File

@ -102,7 +102,7 @@
</ul>
</div>
<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 deleted = <?php echo (isset($deleted) && $deleted) ? 'true' : 'false';?>;
$(document).ready(function() {

View File

@ -32,7 +32,7 @@
<?php echo h($user['User']['id']); ?>&nbsp;
</td>
<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 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'])); ?>

View File

@ -74,7 +74,7 @@
<br />
<div id="edit_object_div">
<?php
$deleteSelectedUrl = '/attributes/deleteSelected/' . $event['Event']['id'];
$deleteSelectedUrl = $baseurl . '/attributes/deleteSelected/' . $event['Event']['id'];
if (empty($event['Event']['publish_timestamp'])) {
$deleteSelectedUrl .= '/1';
}
@ -88,7 +88,7 @@
echo $this->Form->end();
?>
<?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(
'type' => 'text',
'value' => '',
@ -98,7 +98,7 @@
echo $this->Form->end();
?>
<?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(
'type' => 'text',
'value' => '',
@ -259,7 +259,7 @@ attributes or the appropriate distribution level. If you think there is a mistak
</ul>
</div>
<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 ajaxResults = {"hover": [], "persistent": []};
var timer;

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -479,7 +479,7 @@
$clone.find('strong').text('Synchronization result:');
if (job_sent) {
$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 {
$clone.find('#submoduleGitResult')
.text(sync_result);

View File

@ -79,7 +79,7 @@
?>
</table>
<?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>
<?php
echo $this->Form->hidden('event_id');

View File

@ -5,7 +5,7 @@
'children' => array(
array(
'text' => __('Overview'),
'url' => '/servers/serverSettings/',
'url' => $baseurl . '/servers/serverSettings/',
'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>' : ''
)
),
'url' => '/servers/serverSettings/' . h($k),
'url' => $baseurl . '/servers/serverSettings/' . h($k),
'active' => $k == $active_tab
);
}
$data['children'][0]['children'][] = array(
'url' => '/servers/serverSettings/diagnostics',
'url' => $baseurl . '/servers/serverSettings/diagnostics',
'html' => sprintf(
'%s%s',
__('Diagnostics'),
@ -41,12 +41,12 @@
);
$data['children'][0]['children'][] = array(
'url' => '/servers/serverSettings/files',
'url' => $baseurl . '/servers/serverSettings/files',
'text' => __('Manage files'),
'active' => $active_tab === 'files'
);
$data['children'][0]['children'][] = array(
'url' => '/servers/serverSettings/workers',
'url' => $baseurl . '/servers/serverSettings/workers',
'title' => __('Workers'),
'active' => 'workers' == $active_tab,
'html' => sprintf(
@ -61,7 +61,7 @@
'requirement' => !empty($worker_array)
);
$data['children'][0]['children'][] = array(
'url' => '/servers/serverSettings/download',
'url' => $baseurl . '/servers/serverSettings/download',
'title' => __('Download report'),
'html' => '<i class="fa fa-download"></i>'
);

View File

@ -103,7 +103,7 @@
<td class="actions short" style="<?php echo $style; ?>">
<?php
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>
@ -115,7 +115,7 @@
</table>
<?php
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->end();
}
@ -126,7 +126,7 @@
<?php
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->end();
}

View File

@ -12,7 +12,7 @@
<div style="padding-left:0px;padding-right:5px;float:left;">
<?php if ($isSiteAdmin): ?>
<?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>
<?php

View File

@ -16,7 +16,7 @@
</div><br />
<div class="input file" id="file_container_<?php echo $element_id;?>">
</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;"';?>>
<?php echo __('Error') . ': ' . $errors[$element_id]; ?>
</div>

View File

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

View File

@ -1,6 +1,6 @@
<?php
$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>
<legend><?php echo $action == 'add' ? __('Add EventGraph') : __('Edit EventGraph'); ?></legend>

View File

@ -1,6 +1,6 @@
<div class="confirmation">
<?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');
?>
<legend><?php echo __('Event Deletion');?></legend>

View File

@ -1,6 +1,6 @@
<div class="confirmation">
<?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 = "";
if ($type == 'publish') $extraTitle = ' (no email)';
$message = __('Publish Event%s', $extraTitle);

View File

@ -1,5 +1,5 @@
<?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-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">
<?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 = "";
?>
<legend><?php echo __('Toggle Correlation %s', $event['Event']['disable_correlation'] ? __('on') : __('off'));?></legend>

View File

@ -2,9 +2,9 @@
<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.
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>
<?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>
<span>
<?php

View File

@ -175,7 +175,7 @@
<script type="text/javascript">
function generate(i, type, id, progress, modified) {
$.ajax({
url: "/jobs/cache/" + type,
url: "<?php echo $baseurl; ?>/jobs/cache/" + type,
})
.done(function(data) {
jobsArray[i] = data;
@ -186,7 +186,7 @@
}
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);
x.style.width = data+"%";
if (data > -1 && data < 100) {

View File

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

View File

@ -19,7 +19,7 @@
$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) {
echo $this->Form->input('force', array(
'checked' => false,

View File

@ -2,7 +2,7 @@
<h2><?php echo h($title); ?></h2>
<?php
$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'));
$formSettings = array(
'type' => 'hidden',

View File

@ -250,7 +250,7 @@
}
$table_data[] = array(
'key' => __('Sightings'),
'element' => '/Events/View/eventSightingValue',
'element' => $baseurl . '/Events/View/eventSightingValue',
'element_params' => array(
'sightingPopover' => $sightingPopover,
'event' => $event,
@ -563,20 +563,20 @@ $(document).ready(function () {
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);
});
});
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);
});
}
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);
});
}

View File

@ -1,5 +1,5 @@
<?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->end();
?>

View File

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

View File

@ -3,7 +3,7 @@
<div class="pagination">
<ul>
<?php
$eventViewURL = '/feeds/previewEvent/' . h($id) . '/';
$eventViewURL = $baseurl . '/feeds/previewEvent/' . h($id) . '/';
$this->Paginator->options(array(
'url' => $id,
'update' => '.span12',
@ -69,7 +69,7 @@
</td>
<td ondblclick="document.location.href ='<?php echo $eventViewURL . h($uuid);?>'" class="short"><?php echo h($event['timestamp']); ?></td>
<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>
</td>
</tr>

View File

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

View File

@ -39,10 +39,10 @@
</div>
<script type="text/javascript">
$(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);
});
$.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);
});
});

View File

@ -18,7 +18,8 @@ App::uses('AppHelper', 'View/Helper');
if (!empty($imgOptions)) {
foreach ($imgOptions as $field => $imgOption) {
$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,
isset($options['name']) ? h($options['name']) : h($options['id']),
(int)$size,
@ -27,7 +28,8 @@ App::uses('AppHelper', 'View/Helper');
if (!$raw) {
$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'])),
$result
);
@ -42,7 +44,8 @@ App::uses('AppHelper', 'View/Helper');
);
} else {
$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'])),
h($options['name'])
);

View File

@ -40,7 +40,7 @@
function queueInterval(k, id) {
intervalArray[k] = setInterval(function() {
if (tabIsActive) {
$.getJSON('/jobs/getGenerateCorrelationProgress/' + id, function(data) {
$.getJSON('<?php echo $baseurl; ?>/jobs/getGenerateCorrelationProgress/' + id, function(data) {
var x = document.getElementById("bar" + id);
x.style.width = data+"%";
if (data > 0 && data < 100) {
@ -61,25 +61,25 @@
array(
'children' => array(
array(
'url' => '/jobs/index',
'url' => $baseurl . '/jobs/index',
'text' => __('All'),
'title' => __('Show all queues'),
'active' => !$queue
),
array(
'url' => '/jobs/index/default',
'url' => $baseurl . '/jobs/index/default',
'text' => __('Default'),
'title' => __('Show default queue'),
'active' => $queue === 'default'
),
array(
'url' => '/jobs/index/email',
'url' => $baseurl . '/jobs/index/email',
'text' => __('Email'),
'titles' => __('Show email queue'),
'active' => $queue === 'email'
),
array(
'url' => '/jobs/index/cache',
'url' => $baseurl . '/jobs/index/cache',
'text' => __('Cache'),
'title' => __('Show cache queue'),
'active' => $queue === 'cache'
@ -147,7 +147,7 @@
echo h($item['Job']['job_status']);
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
endif;
?>

View File

@ -53,12 +53,12 @@
'text' => h($filterData['name']),
'title' => __('Modify filters'),
'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(
'requirement' => !empty($filter),
'url' => '/admin/logs/index',
'url' => $baseurl . '/admin/logs/index',
'title' => __('Remove filters'),
'fa-icon' => 'times'
);

View File

@ -1,4 +1,4 @@
<?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->end();

View File

@ -19,7 +19,7 @@
<div id="hiddenFormDiv">
<?php
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->end();
}

View File

@ -1,5 +1,5 @@
<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>
<legend><?php echo __('Add Object Reference'); ?></legend>
<div class="overlay_spacing">

View File

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

View File

@ -1,4 +1,4 @@
<?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->end();

View File

@ -19,7 +19,7 @@
<div id="hiddenFormDiv">
<?php
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->end();
}
@ -31,12 +31,12 @@
array(
'children' => array(
array(
'url' => '/objectTemplates/index',
'url' => $baseurl . '/objectTemplates/index',
'text' => __('Enabled'),
'active' => !$all
),
array(
'url' => '/objectTemplates/index/all',
'url' => $baseurl . '/objectTemplates/index/all',
'text' => __('All'),
'active' => $all
)
@ -118,7 +118,7 @@ foreach ($list as $template):
?>
</td>
<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
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']));

View File

@ -1,7 +1,7 @@
<?php $update_template_available = isset($update_template_available) ? $update_template_available : false; ?>
<div class="<?php if (!isset($ajax) || !$ajax) echo 'form';?>">
<?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'));
?>
<h3><?php echo ucfirst($action) . ' ' . Inflector::humanize(h($template['ObjectTemplate']['name'])) . __(' Object'); ?></h3>

View File

@ -1,5 +1,5 @@
<?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-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>
<p><?php echo __('Make sure that the below Object reflects your expectation before submitting it.');?></p>
<?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));
$formSettings = array(
'type' => 'hidden',

View File

@ -56,17 +56,17 @@
array(
'text' => __('Local organisations'),
'active' => $scope === 'local',
'url' => '/organisations/index/scope:local'
'url' => $baseurl . '/organisations/index/scope:local'
),
array(
'text' => __('Known remote organisations'),
'active' => $scope === 'external',
'url' => '/organisations/index/scope:external'
'url' => $baseurl . '/organisations/index/scope:external'
),
array(
'text' => __('All organisations'),
'active' => $scope === 'all',
'url' => '/organisations/index/scope:all'
'url' => $baseurl . '/organisations/index/scope:all'
),
)
),
@ -104,27 +104,27 @@
<?php
foreach ($orgs as $org): ?>
<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 ='/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 h($org['Organisation']['id']); ?></td>
<td class="short" ondblclick="document.location.href ='<?php echo $baseurl; ?>/organisations/view/<?php echo $org['Organisation']['id'];?>'">
<?php
echo $this->OrgImg->getOrgImg(array('name' => $org['Organisation']['name'], 'id' => $org['Organisation']['id'], 'size' => 24));
?>
</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): ?>
<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; ?>
<td ondblclick="document.location.href ='/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 ='/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 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 ='<?php echo $baseurl; ?>/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']['sector']); ?></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>
<?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;'; ?>
</td>
<?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
@ -135,12 +135,12 @@ foreach ($orgs as $org): ?>
</td>
<td class="short action-links">
<?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
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; ?>
<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>
</tr>
<?php

View File

@ -1,5 +1,5 @@
<?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-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">
<?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>
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">

View File

@ -1,5 +1,5 @@
<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>
<legend><?php echo __('Filter Event Index');?></legend>
<div class="overlay_spacing">
@ -27,7 +27,7 @@
<script type="text/javascript">
var filterContext = "event";
var actionUrl = "<?php echo '/servers/previewIndex/' . h($id); ?>"
var actionUrl = "<?php echo $baseurl . '/servers/previewIndex/' . h($id); ?>"
$(document).ready(function() {
$('.datepicker').datepicker().on('changeDate', function(ev) {
$('.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']['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><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']['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']['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">
<?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');

View File

@ -28,7 +28,7 @@
<dd class="eventTagContainer">
<?php if (!empty($event['Tag'])) foreach ($event['Tag'] as $tag): ?>
<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>
<?php endforeach; ?>&nbsp;
</dd>

View File

@ -4,7 +4,7 @@
<div class="pagination">
<ul>
<?php
$eventViewURL = '/servers/previewEvent/' . h($id) . '/';
$eventViewURL = $baseurl . '/servers/previewEvent/' . h($id) . '/';
$this->Paginator->options(array(
'url' => $id,
'update' => '.span12',
@ -53,7 +53,7 @@
),
array(
'requirement' => count($passedArgsArray) > 0,
'url' => '/servers/previewIndex/' . h($server['Server']['id']),
'url' => $baseurl . '/servers/previewIndex/' . h($server['Server']['id']),
'title' => __('Remove filters'),
'fa-icon' => 'times'
)
@ -170,7 +170,7 @@
?>
</td>
<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>
</td>
</tr>

View File

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

View File

@ -22,12 +22,12 @@
array(
'children' => array(
array(
'url' => '/sharing_groups/index',
'url' => $baseurl . '/sharing_groups/index',
'text' => __('Active Sharing Groups'),
'active' => !$passive
),
array(
'url' => '/sharing_groups/index/true',
'url' => $baseurl . '/sharing_groups/index/true',
'text' => __('Passive Sharing Groups'),
'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']['uuid']); ?></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>
<?php
$combined = "";
@ -62,7 +62,7 @@ foreach ($sharingGroups as $k => $sharingGroup):
if (count($sharingGroup['SharingGroupOrg']) == 0) $combined .= "<br />N/A";
foreach ($sharingGroup['SharingGroupOrg'] as $k2 => $sge) {
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)');
}
}
@ -70,7 +70,7 @@ foreach ($sharingGroups as $k => $sharingGroup):
if (count($sharingGroup['SharingGroupServer']) == 0) $combined .= "<br />N/A";
foreach ($sharingGroup['SharingGroupServer'] as $k3 => $sgs) {
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 {
$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->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; ?>
<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>
</tr>
<?php

View File

@ -21,12 +21,12 @@
endforeach;
?>
<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
if ($sg['SharingGroup']['sync_user_id']):
?>
<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
endif;
?>
@ -47,7 +47,7 @@
foreach ($sg['SharingGroupOrg'] as $sgo):
?>
<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['extend'] ? 'icon-ok' : 'icon-remove'); ?>"></span></td>
</tr>

View File

@ -1,7 +1,7 @@
<h3>Add Sighting</h3>
<div id="sightingsEventId" class="hidden" data-event-id="<?php echo h($event_id); ?>"></div>
<?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(
'options' => array('Sighting', 'False-positive', 'Expiration'),
'default' => 0,

View File

@ -50,13 +50,13 @@ $('.sightingsToggle').click(function() {
if (type == 'graph') {
loadSightingGraph(id, object_context);
} else if (type == 'add') {
$.get( "/sightings/add/" + id, function(data) {
$.get("<?php echo $baseurl; ?>/sightings/add/" + id, function(data) {
$("#sightingsData").html(data);
});
} else {
var org = "";
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);
});
}

View File

@ -1,4 +1,4 @@
<?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();
?>

View File

@ -1,6 +1,6 @@
<div class="confirmation">
<?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>
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">

View File

@ -1,6 +1,6 @@
<div class="confirmation">
<?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>
<div style="padding-left:5px;padding-right:5px;padding-bottom:5px;">

View File

@ -26,7 +26,7 @@
</div>
<div id="hiddenFormDiv">
<?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->end();
?>

View File

@ -1,6 +1,6 @@
<div class="confirmation">
<?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">
<?php

View File

@ -1,6 +1,6 @@
<div class="confirmation">
<?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">
<?php
@ -34,4 +34,4 @@
<?php
echo $this->Form->end();
?>
</div>
</div>

View File

@ -1,6 +1,6 @@
<div class="confirmation">
<?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">
<?php
@ -34,4 +34,4 @@
<?php
echo $this->Form->end();
?>
</div>
</div>

View File

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

View File

@ -150,12 +150,12 @@
<td class="action">
<?php
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('taxonomy_id', array('type' => 'hidden', 'value' => $taxonomy['id']));
echo $this->Form->end();
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('taxonomy_id', array('type' => 'hidden', 'value' => $taxonomy['id']));
echo $this->Form->end();

View File

@ -1,6 +1,6 @@
<div class="template_element_add_attribute">
<?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>
<fieldset>

View File

@ -1,6 +1,6 @@
<div class="template_element_add_file">
<?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>
<fieldset>

View File

@ -1,6 +1,6 @@
<div class="template_element_add_text">
<?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>
<fieldset>

View File

@ -1,6 +1,6 @@
<div class="template_element_add_attribute">
<?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>
<fieldset>

View File

@ -1,6 +1,6 @@
<div class="template_element_add_file">
<?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>
<fieldset>

View File

@ -1,6 +1,6 @@
<div class="template_element_add_text">
<?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>
<fieldset>

View File

@ -22,7 +22,7 @@ foreach ($attributes as $item):?>
endforeach;?>
</table>
<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>
<?php
echo $this->Form->input('attributes', array(

View File

@ -28,13 +28,12 @@
<th><?php echo __('Actions');?></th>
</tr>
<?php
$url = Configure::read('MISP.baseurl');
foreach ($threads as $thread):
$lastPost = end($thread['Post']);
?>
<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
$imgRelativePath = 'orgs' . DS . h($thread['Organisation']['name']) . '.png';
$imgAbsolutePath = APP . WEBROOT_DIR . DS . 'img' . DS . $imgRelativePath;
@ -43,37 +42,37 @@ foreach ($threads as $thread):
?>
&nbsp;
</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
echo h($thread['Thread']['title']);
?>
</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
echo h($thread['Thread']['date_modified']);
?>
&nbsp;
</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
echo isset($lastPost['User']['email']) ? h($lastPost['User']['email']) : '';
?>
&nbsp;
</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
echo h($thread['Thread']['date_created']);
?>
</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
echo h($thread['Thread']['post_count']);
?>
</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
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 class="short action-links">

View File

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

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