Jump to content

Source of data


litebearer

Recommended Posts

Not wanting to 'hijack' another thread, but curious about the error of my ways.

 

Why specifically (and very very clearly as I am OLD fart and totally self taught in php/mysql), why will this not suffice to determine form where POSTED data came?

 

 

page 1 - formstart sessioncreate and store a hashed session variable 'who_is_it' (ie hash 1Q9zFrEd)display the formsubmit to page 2page 2start sessioncreate a hashed variable $is_it-me (ie hash 1Q9zFrEd)compare $is_it_me with the session variable 'who_is_it'   if the camparison == each other    obtain, validate, cleanse and store data   ELSE    not from a vaild source

 

Link to comment
Share on other sites

That scheme serves to check that someone's browser or something (a bot script) visited (requested) your form page at least once and supports passing the session id between pages. That's all it really can check.

 

The session variable should be unset in the form processing code so that only one submission will be processed per visit to the form and the hashed value should be randomly generated and not a fixed/static value. If the hash value is fixed/static for any one visitor, once someone gets that value by actually visiting your form, they can keep using it to submit data and that scheme would consider all the submissions to be valid.

 

If the randomly produced hash was also displayed in the form in the form of a captcha image, the scheme would also require that someone/something has the ability to read the image and submit the value as form data.

Link to comment
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.