Re: import upload file to pgadmin get CSRF error - Mailing list pgadmin-support

From Where is Where
Subject Re: import upload file to pgadmin get CSRF error
Date
Msg-id CAK3r-hPmYGzyWjXa57n=3oQDObWDC7emue=gL-F3o=4FxwS=pw@mail.gmail.com
Whole thread Raw
In response to Re: import upload file to pgadmin get CSRF error  (Where is Where <whisere@gmail.com>)
Responses Re: import upload file to pgadmin get CSRF error
List pgadmin-support
Is there a way to apply this bug fix on a installation on redhat?The 4.9 redhat yum package is not available yet. Thanks!

On Tue, Jun 25, 2019 at 9:30 AM Where is Where <whisere@gmail.com> wrote:
Thank you! I will wait for the release on Thursday. Will the redhat yum package be updated too? Or can I download the tar file and use some file from it to replace the file on the server?

Thanks.

On Mon, Jun 24, 2019 at 4:25 PM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:


On Mon, Jun 24, 2019 at 11:42 AM Where is Where <whisere@gmail.com> wrote:
It will require bundling of the static files after applying the patch.
Instead, you can install the pgAdmin from the nightly builds having the latest code.

          // 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,

Thanks, Junran

On Mon, Jun 24, 2019 at 3:47 PM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:

On Mon, Jun 24, 2019 at 11:13 AM Where is Where <whisere@gmail.com> wrote:
Hello, we are trying to import csv file to database from pgadmin, but when uploading file it reports '
400 Bad Request <h1>Bad Request</h1> <p>The CSRF token is missing.</p> '
I looked at config.py but can't find any related setting.
Any idea is much appreciated.

This issue has already been reported and fixed. (Ref: https://redmine.postgresql.org/issues/4350)
You will get the fix in the upcoming release which is scheduled on coming Thursday.

Thanks,
Khushboo

pgadmin-support by date:

Previous
From: Dave Page
Date:
Subject: Re: pgadmin 4 feature behavior change requests
Next
From: Murtuza Zabuawala
Date:
Subject: Re: import upload file to pgadmin get CSRF error