mirror of https://github.com/MISP/MISP
fix: remove trailing slash from MISP.baseurl
parent
7dbe813e89
commit
6933050e2e
|
@ -145,7 +145,7 @@ class AppController extends Controller {
|
|||
if (substr($baseurl, -1) == '/') {
|
||||
// if the baseurl has a trailing slash, remove it. It can lead to issues with the CSRF protection
|
||||
$baseurl = rtrim($baseurl, '/');
|
||||
Configure::write('MISP.baseurl', $baseurl);
|
||||
$this->Server->serverSettingsSaveValue('MISP.baseurl', $baseurl);
|
||||
}
|
||||
$this->set('baseurl', h($baseurl));
|
||||
|
||||
|
|
|
@ -2592,6 +2592,7 @@ class Server extends AppModel {
|
|||
}
|
||||
$settingsString = var_export($settingsArray, true);
|
||||
$settingsString = '<?php' . "\n" . '$config = ' . $settingsString . ';';
|
||||
opcache_reset();
|
||||
file_put_contents(APP . 'Config' . DS . 'config.php', $settingsString);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue