JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Originally posted by Mark Beattie:
A user, or a hacker, is prevented from accessing the following URLs:
http://localhost/videos/servlet/VideoServlet?action=addvideo
http://localhost/videos/servlet/VideoServlet/addvideos.jsp
http://localhost/videos/servlet/VideoServlet/listvideos.jsp
In all cases these urls return to:
http://localhost/videos/servlet/VideoServlet/
The above urls are accessible when cookie "favorite_cheese' has the value "extra stinky bloo cheese". The VideoServlet.java code checks the cookie each time a page is accessed.
When the Log out button is clicked, the 'cheese' cookie is set to a different value, thus preventing the other pages from being displayed. This required a lot of experimentation before I got it to work.
Much to my puzzlement is that the cheese cookie disappears when I close and restart the browser. Mind you, this is convenient for this assignment.