Search the Community
Showing results for tags 'bug'.
-
Hello: I am reading this book and following on the examples. I finished the ex1 and I am testing the site. I notice that When i Log out from an account then refresh the page I go back to the index.php (which is OK). Now the problem is when i use the back button of the browser. If i go back to the log out page then back again (to the page where I logged out from) at first there will be an error, but if i refresh the page There i am logged back in with all the credentials as if i never logged out. This of course is a flaw. Imagine I am on an public place and I log out of a site and go. then someone (accidentally or maliciously) sits on the same pc and hits back on the browser twice and all of a sudden he is logged in on my account. My question is: How can i fix this security hole ? can someone point me in the right direction? Thank you. By the way Mr Ullman, if you reading this GREAT BOOK!!!. Sorry for the long post. Thank you in advance to all who answer.
-
When I user the instanceof keyword for the Singleton class in Ch07 page 218, it is returning true. See below. // Create a second object to confirm: $TEST = Config::getInstance(); // see what instanceof thinks... if ($TEST instanceof Config) { echo '<pre>$TEST IS instance of Config</p>'; } else { echo '<pre>$TEST IS NOT instance of Config</p>'; } It is echoing that $TEST IS instance of Config. Am I doing something wrong?