Questions tagged [csrf-token]

Use this tag for questions related to csrf (Cross-site request forgery) that involves the generation of a token.

A csrf-token is a secret value added to a web form by the server and sent back by the user as part of a POST request, used to prevent cross-site request forgeries by making sure that the user sending the POST request has actually loaded the form.

466 questions
0
votes
2 answers

sending form by js on laravel based bootstrap give me an error

I would like to achieve this simple task:
  • Click me
My page is a little bit complicated, but nothing too hard: I've a modal loaded by…
JahStation
  • 893
  • 3
  • 15
  • 35
0
votes
1 answer

Send post request with flask_jwt_extended

I am trying to send a post request to a Flask server that uses flask_jwt_extended tokens. I don’t want the page to refresh after each submit and I managed to do this using jquery. But I am unable to send CSRF token in a way that flask_jwt_extended…
msche
  • 66
  • 9
0
votes
0 answers

CSRF Token mismatch with Laravel-Echo-Server and Homestead

I'm trying to setup the broadcast system of Laravel, but I have an issue with the CSRF Token. I send the token to my SPA then I setup my options for Laravel-Echo window.Echo = new Echo({ …
Dimitri
  • 45
  • 8
0
votes
1 answer

CSRF enabled throws 403 (forbidden) in CodeIgniter

So I planned to implement CSRF in my website and set what's needed which I think I set correctly but still having issue with ajax submit form. $config['csrf_protection'] = TRUE; $config['csrf_token_name'] =…
Leon
  • 329
  • 2
  • 3
  • 15
0
votes
1 answer

Can't get an object deletion - ?csrfmiddlewaretoken= appears at the end of the current URL in the urlbar (django)

I am building a simple social network in django. In the "home" of my social, I have the list of all posts published by all users, with author and publishing date. Under each post of the logged user, a "delete" button appears. If the user clicks on…
0
votes
1 answer

How to add a django tag i.e .{% *** %} to html created using format_html?

i have a table column as follows actioncolumn = tables.Column(verbose_name="action",orderable=False,empty_values=[]) def render_actioncolumn(self): edit_btn='
'\ '
0
votes
0 answers

Python - Website Log In - Scraping CSRF Token failed

I am new here and new at programming. I am trying to log in the…
0
votes
1 answer

CSRF Token request position Django and Nuxt

lately i'm trying to implement a login api for a website. I'm using Nuxt for the FE, Django REST Framework for the BE and Nuxt Auth Module for the JWT. Now I tryed to use the normal option for implement my…
Antonio
  • 11
  • 1
0
votes
0 answers

How can I set csrfExpires time in cakePHP2?

I want to overwrite public $csrfExpires = '+30 minutes'; in SecurityComponent.php. I want to make the token expire after 14 minutes. So I have added the below code in my controller file. if (isset($this->Security) && $this->action == 'myAction') { …
web_developer
  • 71
  • 1
  • 9
0
votes
0 answers

Getting 419 (unknown status) while submitting post ajax in laravel

Getting 419 (unknown status) while submitting post ajax in laravel with the following code url: '/forksnippet/saveforksnippets', type: 'POST', data: '_token': '{{ csrf_token() }}', …
Upasana Chauhan
  • 948
  • 1
  • 11
  • 32
0
votes
0 answers

Laravel ajax request with csrf

I'm using Laravel 7.2.0, trying to send an ajax request but I have a problem. I'm trying to pass the csrf token from the meta but it give me 419 error. It only works if I add @csrf on the form as below, but the controller dont get an ajax…
sharkmax
  • 1
  • 1
0
votes
1 answer

Laravel 5, token mismatch during login but gives 419 page expired

I have a laravel 5.8 app, deployed some weeks ago into production. One user (and one user only) appears to have problems with the login and gets a 419 page expires error. I tried to trace this issue and got the same error. The problem appears…
Canelo Digital
  • 340
  • 2
  • 10
0
votes
1 answer

CSRF token mismatched when using ajax with datatables in laravel 6.2

I am trying to generate CSV, excel and pdf files from the data in data tables. My code is as following- In web.php Route::post('/admin/server', 'ExpenseController@exporter'); In ExpenseController public function exporter(){ $table =…
user12137409
0
votes
2 answers

Error: 419|Page Expired (Laravel 6.0 -Mysql)

I have Added the @csrf token and in form and in the meta tag in header but still getting the same erro. When I register it works and redirects me to the home page. That's fine but it doesn't redirect me to home page when I login although the…
Salman
  • 1
  • 4
0
votes
1 answer

Invalid CSRF token on Symfony 3.4 with Nginx

I have a Symfony 3.4 app that used to work well on my last hosting (apache) But I have changed the hosting, and I am now using Nginx on Debian, using the nginx config given by Symfony here :…
wyllyjon
  • 505
  • 1
  • 5
  • 20