Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7643685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:30:27+00:00 2026-05-31T09:30:27+00:00

I asked this question about reasons to use Drupal 7’s Forms API as opposed

  • 0

I asked this question about reasons to use Drupal 7’s Forms API as opposed to just processing form submission requests myself and eventually calling a function like node_save() or comment_save(). while a variety of reasons were given for using the Forms API, only one possible security vulnerability was raised: by not using Drupal 7’s Forms API, I’d be missing out on the CSRF prevention techniques it uses. From what I’ve read, this basically involves the use of a token for validating requests.

My question is twofold:

  1. Is it possible to leverage Drupal’s token method of CSRF prevention in the script I write to process the Ajax request, thereby entirely eliminating the added risk I’m assuming by not using the Forms API? If so, how?
  2. Does the Forms API employ techniques beyond the use of tokens that I should also implement?

Please note that I do not want this question to become a discussion of whether I should use the Forms API or not.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T09:30:29+00:00Added an answer on May 31, 2026 at 9:30 am

    The token is generated by drupal_get_token() and validated using drupal_valid_token().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yesterday I asked this general question about decimals and their internal precisions. Here is
I saw this question asked about C# I would like an answer for PHP.
I asked a question about different testing frameworks yesterday. This question can be found
I asked a similar question about this previously, but I did not specify that
I asked a question about Garbage Collection in Java in this topic . But
In this question, I asked about breaking a dataset into subsets, and got a
In this question , I asked about using queue's and threads in C#. I
This question has been asked in a C++ context but I'm curious about Java.
This is related to this question I asked earlier about syntax highlighting user-defined blocks
This stems from a previous question I asked - about a write conflict with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.