Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Captcha idea

  1. #1
    Regular Coder
    Join Date
    Sep 2006
    Location
    Colorado
    Posts
    132
    Thanks
    7
    Thanked 1 Time in 1 Post

    Captcha idea

    I was thinking the other day and just for the sake of not using sessions I was thinking you could md5() your captcha value and put it in a hidden form field, then md5() the user input and compare it. This would work no? I just wanted to make sure I wasnt over looking some easy way to get the captcha value.
    -bubbles

  • #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,007
    Thanks
    2
    Thanked 311 Times in 303 Posts
    If this is just a straight md5 of the secret value, this would not be secure as you could just send back your own md5'ed value in the hidden field variable that matches the entered value.

    However, if the secret value and the entered value are both "salted" by prepending or appending a nonsense string before performing the md5, then if the hidden field variable were replaced with a straight md5, it would not match the md5 of the entered value with the "salt" string applied.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #3
    Regular Coder
    Join Date
    Sep 2006
    Location
    Colorado
    Posts
    132
    Thanks
    7
    Thanked 1 Time in 1 Post
    Ah. I knew I was forgetting something with the hidden form field. Thanks for your help that should work.
    -bubbles


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •