mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-09 23:54:09 -06:00
Ensure we include the CSRF token when uploading files. Fixes #4350
This commit is contained in:
parent
23364464c2
commit
08b78fb6a1
@ -25,4 +25,5 @@ Bug fixes
|
||||
| `Bug #4317 <https://redmine.postgresql.org/issues/4317>`_ - Ensure that browser auto-fill doesn't cause Help pages to be opened unexpectedly.
|
||||
| `Bug #4320 <https://redmine.postgresql.org/issues/4320>`_ - Fix issue where SSH tunnel connection using password is failing, it's regression of Master Password.
|
||||
| `Bug #4329 <https://redmine.postgresql.org/issues/4329>`_ - Fix an initialisation error when two functions with parameters are debugged in parallel.
|
||||
| `Bug #4343 <https://redmine.postgresql.org/issues/4343>`_ - Fix issue where property dialog of column should open properly for EPAS v12.
|
||||
| `Bug #4343 <https://redmine.postgresql.org/issues/4343>`_ - Fix issue where property dialog of column should open properly for EPAS v12.
|
||||
| `Bug #4350 <https://redmine.postgresql.org/issues/4350>`_ - Ensure we include the CSRF token when uploading files.
|
@ -1466,9 +1466,14 @@ define([
|
||||
'<a href="javascript:void(0);" class="fa fa-trash dz_file_remove" data-dz-remove></a>' +
|
||||
'</div>';
|
||||
|
||||
// We need to append our csrf token with dropzone's ajax request header
|
||||
let csrfToken = {};
|
||||
csrfToken[pgAdmin.csrf_token_header] = pgAdmin.csrf_token;
|
||||
|
||||
$('div#multiple-uploads').dropzone({
|
||||
paramName: 'newfile',
|
||||
url: pgAdmin.FileUtils.fileConnector,
|
||||
headers: csrfToken,
|
||||
maxFilesize: fileSize,
|
||||
maxFiles: config.upload.number,
|
||||
addRemoveLinks: true,
|
||||
|
Loading…
Reference in New Issue
Block a user