# Add Article und wie CSRF funktionieren?

**URL:** <https://forum.shopware.com/t/add-article-und-wie-csrf-funktionieren/98634>\
**Category:** Shopware 6 (German)\
**Created:** [20. Februar 2023 um 19:58 UTC](https://forum.shopware.com/t/add-article-und-wie-csrf-funktionieren/98634 "2023-02-20T19:58:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [20. Februar 2023 um 19:58 UTC](https://forum.shopware.com/t/add-article-und-wie-csrf-funktionieren/98634/1 "2023-02-20T19:58:23Z")

</div>

Ich bin dabei ein eigenes Theme zu bauen.  
Im Standardtheme kann man Artikel hinzufügen, und es sind alle cookies/csrf übergeben.  
Wie kann ich einen Artikel in einem neutralen Theme zufügen?  
Brauche ich da immer die Article lineitem id oder kann ich das auch mit der Artikel-Nummer machen?

a0289c9596ba4e129c12d791c8ab306d

Und vor allem, wie bekomme ich die Cookies mit den CSRF Daten?

Im theme habe ich oft gefunden:

> {# @deprecated tag:v6.5.0 …  
> {{ sw\_csrf(…)

aber was hat das zu bedeuten? Ist es nicht updatesicher? Und was macht es?

---

<div class="post-metadata">

**Author:** ![sonic](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sonic/32/25728_2.png) [@sonic](https://forum.shopware.com/u/sonic)\
**Post date:** [21. Februar 2023 um 08:40 UTC](https://forum.shopware.com/t/add-article-und-wie-csrf-funktionieren/98634/2 "2023-02-21T08:40:17Z")

</div>

Zum Thema kann ich Dir nicht helfen, wenn Du aber noch am entwickeln bist, solltest Du auf SW 6.5 hin anpassen, und da fällt das CSRF weg!

Siehe zu RC

> **[Shopware 6.5: The Release Candidate is now available!](https://www.shopware.com/en/news/shopware-6-5-release-candidate/)**
>
> We are calling developers to test the Shopware 6.5 Release Candidate and welcome feedback that we will consider for the final release.

> We removed the CSRF protection in favor of the SameSite cookie strategy, which we already implemented in Shopware 6.

---

<div class="post-metadata">

**Author:** ![brettvormkopp](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/brettvormkopp/32/7788_2.png) [@brettvormkopp](https://forum.shopware.com/u/brettvormkopp)\
**Post date:** [21. Februar 2023 um 09:30 UTC](https://forum.shopware.com/t/add-article-und-wie-csrf-funktionieren/98634/3 "2023-02-21T09:30:06Z")

</div>

Danke für den Hinweis.

> You do not have to implement any additional request protection, as the SameSite cookie strategy is already in place.

Aber es geht nur mit dem Standard-Theme, mit einem neutralen unabhängigen nicht-abgeleitetem Theme bekomme ich die Cookies nicht. Gibt es sowas wie einen „heimlichen“ Cookie-Set header?
