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

  • Home
  • SEARCH
  • 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 7007417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:36:16+00:00 2026-05-27T21:36:16+00:00

I already seen some question from here (stackoverflow) and THIS post, but I still

  • 0

I already seen some question from here (stackoverflow) and THIS post, but I still have some questions…

  1. Using hidden value in the post form and check it when post reach the server.

    • The hidden value can easy be copied and send exactly like the real one, “hard to guess” (like md5) will not help. (right?)
  2. Setting a cookie when you reach the form and send the cookie value as a hidden value.

    • You can easily change a cookie value or send a custom cookie exactly like the real one using the same real hidden value. (right?)
  3. Using ‘timeout’, the POST values cannot reach too late.

    • So, if you’re slow you will fail when you try to set everything up with the hidden value. If you’re fast it gonna work. (right?)

I want to be protected about CSRF…but how exactly I do it?

  • 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-27T21:36:17+00:00Added an answer on May 27, 2026 at 9:36 pm

    The easiest way I found to prevent CSRF issues is:

    1. On the server side, assign an HttpOnly cookie to the client with a random (unguessable) token

    2. Place a hidden field on the form with that cookie value

    3. Upon form submit, ensure the hidden field value equals the cookie value (on the server side of things)

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

Sidebar

Related Questions

I've seen a few questions on this topic already but I'm looking for some
I googled,I binged,I already have seen the other duplicates here,but none of them work
I've seen this question asked already - but none of the answers really gelled
If you have seen my previous questions, you'd already know I am a big
I have seen this question asked in a couple of different ways on SO
Here's a question you may have seen around the 'nets in various forms...summed up
Sorry about repeating the Question, but this is some what different. I'm looking for
I've seen some results on StackOverflow already on a similar topic and they all
I saw some threads on this already on Stack, but wanted a little more
I already know the obvious answer to this question: just download <insert favorite windows

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.