Jump to content

Recommended Posts

Tokens must be impossible to predict and there must never be duplicates.

 

If you're new to programming, I suggest using PHP's built in session handler. It will generate tokens for you and manage the server<->user relationship

 

http://php.net/manual/en/session.examples.basic.php

Link to comment
https://forums.phpfreaks.com/topic/247375-token-using/#findComment-1270483
Share on other sites

No, a token will not prevent an external form submitting to your site.

 

All an attacker would need to do was request your form page, grab the token, insert it into his rouge form and submit as normal.

 

It forces an attacker to take an extra step, but the code required to beat it would take 5 minutes to write.

 

As I said in a previous post (I believe it was by you) there is NO WAY to prevent an external site from submitting a form to your page. You can practically stop automated form submissions by using reCAPTCHA.

Link to comment
https://forums.phpfreaks.com/topic/247375-token-using/#findComment-1270520
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.