# The provided CSRF-Token is invalid

**URL:** https://forum.shopware.com/t/the-provided-csrf-token-is-invalid/42579
**Category:** Allgemein
**Created:** [5. Januar 2017 um 11:31 UTC](https://forum.shopware.com/t/the-provided-csrf-token-is-invalid/42579 "2017-01-05T11:31:33Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![nadsat](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@nadsat](https://forum.shopware.com/u/nadsat)
#### Post date: [5. Januar 2017 um 11:31 UTC](https://forum.shopware.com/t/the-provided-csrf-token-is-invalid/42579/1 "2017-01-05T11:31:33Z")

</div>

Hallo Shopware-Community!

Nach dem updaten auf die neuste Version besteht keine Möglichkeit mehr ins Backend zu gelangen. Folgender Fehlerreport erscheint:

## Ups! Ein Fehler ist aufgetreten!

Die nachfolgenden Hinweise sollten Ihnen weiterhelfen.

### The provided CSRF-Token is invalid. If you’re sure that the request should be valid, the called controller action needs to be whitelisted using the CSRFWhitelistAware interface. in engine/Shopware/Components/CSRFTokenValidator.php on line 118

### Stack trace:

```
#0 engine/Library/Enlight/Event/Handler/Default.php(91): Shopware\Components\CSRFTokenValidator-\>checkBackendTokenValidation(Object(Enlight\_Controller\_ActionEventArgs))
 #1 engine/Library/Enlight/Event/EventManager.php(214): Enlight\_Event\_Handler\_Default-\>execute(Object(Enlight\_Controller\_ActionEventArgs))
 #2 engine/Library/Enlight/Controller/Action.php(141): Enlight\_Event\_EventManager-\>notify('Enlight\_Control...', Object(Enlight\_Controller\_ActionEventArgs))
 #3 engine/Library/Enlight/Controller/Dispatcher/Default.php(523): Enlight\_Controller\_Action-\>dispatch('indexAction')
 #4 engine/Library/Enlight/Controller/Front.php(223): Enlight\_Controller\_Dispatcher\_Default-\>dispatch(Object(Enlight\_Controller\_Request\_RequestHttp), Object(Enlight\_Controller\_Response\_ResponseHttp))
 #5 engine/Shopware/Kernel.php(178): Enlight\_Controller\_Front-\>dispatch()
 #6 vendor/symfony/http-kernel/HttpCache/HttpCache.php(487): Shopware\Kernel-\>handle(Object(Enlight\_Controller\_Request\_RequestHttp), 1, true)
 #7 engine/Shopware/Components/HttpCache/AppCache.php(255): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true, NULL)
 #8 vendor/symfony/http-kernel/HttpCache/HttpCache.php(258): Shopware\Components\HttpCache\AppCache-\>forward(Object(Symfony\Component\HttpFoundation\Request), true)
 #9 engine/Shopware/Components/HttpCache/AppCache.php(103): Symfony\Component\HttpKernel\HttpCache\HttpCache-\>pass(Object(Symfony\Component\HttpFoundation\Request), true)
 #10 shopware.php(113): Shopware\Components\HttpCache\AppCache-\>handle(Object(Symfony\Component\HttpFoundation\Request))
 #11 {main}

```

&nbsp;

Da bei der Ansicht des Shops die Einkaufswelten nicht mehr angezeigt werden, haben wir folgendes probiert:

[https://synonymous.rocks/shopware-5-2-csrf-token-is-invalid/](https://synonymous.rocks/shopware-5-2-csrf-token-is-invalid/)

Leider erfolglos. Das Problem bleibt bestehen.

Hat jemand von euch vielleicht einen Lösungsansatz?

&nbsp;

---

<div class="post-metadata">

### Author: ![useg](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@useg](https://forum.shopware.com/u/useg)
#### Post date: [5. Januar 2017 um 11:34 UTC](https://forum.shopware.com/t/the-provided-csrf-token-is-invalid/42579/2 "2017-01-05T11:34:52Z")

</div>

Einfach mal die Suche benutzen!

[https://forum.shopware.com/search?Search=CSRF-Token+is+invalid&sLanguage=1](https://forum.shopware.com/search?Search=CSRF-Token+is+invalid&sLanguage=1)  
[CSRF-Token is invalid - Google Search](https://www.google.de/search?q=CSRF-Token+is+invalid&oq=CSRF-Token+is+invalid)

Die „schnelle“ Problemlösung ist, die CSFR Protection komplett abzuschalten.&nbsp;

Uwe

---

<div class="post-metadata">

### Author: ![nadsat](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@nadsat](https://forum.shopware.com/u/nadsat)
#### Post date: [5. Januar 2017 um 13:09 UTC](https://forum.shopware.com/t/the-provided-csrf-token-is-invalid/42579/3 "2017-01-05T13:09:38Z")

</div>

Danke!

Habe ich gemacht. Die Backend-Anmelde-Maske wird auch ohne Fehlerprotokoll angezeigt.

Wenn die Anmeldedaten eingegeben werden (habe diese nochmals überprüft, alles korrekt eingetragen) und man auf den Anmelde-Button klick passiert nichts, lädt nicht mal mehr im Hintergrund…

Folgendes habe ich in die config.php eingetragen:

\<?php return array (  
 &nbsp;&nbsp;&nbsp; 'db' =\\> array ( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'host' =\\> 'localhost', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'port' =\\> '3306', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'username' =\\> 'xxxxx', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'password' =\\> 'xxxxx', &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'dbname' =\\> 'xxxxx', &nbsp;&nbsp;&nbsp; ), &nbsp;&nbsp;&nbsp; 'csrfProtection' =\\> [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'frontend' =\\> FALSE, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'backend'&nbsp; =\\> FALSE &nbsp;&nbsp;&nbsp;], );

---

<div class="post-metadata">

### Author: ![useg](https://avatars.discourse-cdn.com/v4/letter/u/df705f/32.png) [@useg](https://forum.shopware.com/u/useg)
#### Post date: [5. Januar 2017 um 13:56 UTC](https://forum.shopware.com/t/the-provided-csrf-token-is-invalid/42579/4 "2017-01-05T13:56:03Z")

</div>

Geh mal auf den Server und lösche den **_Inhalt_** des Ordners „/var/cache“ oder benenne nur mal den darin enthalten Ordner „production\_…“ um, vieleicht hängt noch der Backend-Cache.

Auch mal den Browser-Cache löschen.

Uwe

---

<div class="post-metadata">

### Author: ![nadsat](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@nadsat](https://forum.shopware.com/u/nadsat)
#### Post date: [5. Januar 2017 um 14:45 UTC](https://forum.shopware.com/t/the-provided-csrf-token-is-invalid/42579/5 "2017-01-05T14:45:31Z")

</div>

Danke!

Habe ich alles ausprobiert, leider erfolglos…

---

<div class="post-metadata">

### Author: ![Marcus\_Salden](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@Marcus\_Salden](https://forum.shopware.com/u/Marcus_Salden)
#### Post date: [3. Mai 2021 um 10:04 UTC](https://forum.shopware.com/t/the-provided-csrf-token-is-invalid/42579/6 "2021-05-03T10:04:02Z")

</div>

Nicht empfehlenswert!
