note 55080 added to function.sleep

From: Date: Mon, 25 Jul 2005 09:07:57 +0000
Subject: note 55080 added to function.sleep
Groups: php.notes 
Request: Send a blank email to php-notes+get-92402@lists.php.net to get a copy of this message
Regarding the use of sleep to discourage crackers, there is an alternative that could be used. Derived from the "HTTP Digest Access Authentication" concept at http://www.faqs.org/rfcs/rfc2617.html under chapter "3 Digest Access Authentication Scheme". For every time the login page is requested, have the server generate and remember a nonce and attach it to the login form. When the form comes back with that nonce, check if the nonce received matches the one in memory. If yes, continue the login process, otherwise reject the login attempt. Throw away the nonce after one use. Brute-force cracking won't be an option in this case, because the hacker/cracker must download the login page for every attempt to try a password. And this will also neatly sidestep a possible weakness via the use of "sleep" to DoS attacks. ---- Manual Page -- http://www.php.net/manual/en/function.sleep.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55080 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55080&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55080&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55080&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55080&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55080&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55080&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55080&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#92402) next »