Score:-2

How to add anti csrf token to the forms (No Anti-CSRF tokens were found in a HTML submission form.)

cn flag

When i was testing my drupal 9 website for security i got the error as "No Anti-CSRF tokens were found in a HTML submission form." solution is given as "use anti-CSRF packages such as the OWASP CSRFGuard." but how to use these in drupal forms.

Score:0
cn flag

Drupal's form API already implements CSRF protection. If your form is not using the form API, you should convert it to do so, and you will automatically have the protection you need.

If your form is using the form API, and there are no tokens in the markup, then check custom code/templates/etc that might be removing it.

If you're not going to use Drupal's form API, you'll need to approach this as a standard development task, and implement it in the way that makes most sense for the details of your custom form implementation.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.