mirror of https://github.com/MISP/MISP
Merge pull request #2684 from JanSkalny/fix_baseurl_trailing_slash
fix: remove trailing slash from MISP.baseurlpull/2754/head
commit
6e7a9da729
|
@ -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));
|
||||
|
||||
|
|
|
@ -2613,6 +2613,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