Add missing CSRF check in saveUploadDB() method
This commit is contained in:
parent
573754c450
commit
357316cdf9
|
|
@ -199,6 +199,7 @@ class ConfigController extends BaseController
|
|||
*/
|
||||
public function saveUploadedDb()
|
||||
{
|
||||
$this->checkCSRFParam();
|
||||
$filename = $this->request->getFilePath('file');
|
||||
|
||||
if (!file_exists($filename) || !$this->configModel->uploadDatabase($filename)) {
|
||||
|
|
|
|||
|
|
@ -8,9 +8,7 @@
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<form action="<?= $this->url->href('ConfigController', 'saveUploadedDb') ?>" method="post" enctype="multipart/form-data">
|
||||
<?= $this->form->csrf() ?>
|
||||
|
||||
<form action="<?= $this->url->href('ConfigController', 'saveUploadedDb', [], true) ?>" method="post" enctype="multipart/form-data">
|
||||
<?= $this->form->label(t('Database file'), 'file') ?>
|
||||
<?= $this->form->file('file') ?>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue