Rexolio
Technical User
- Aug 29, 2001
- 230
I'm using a session for a secure area of my site. If the user logs in with the correct password, the session
PASSWORD PROCESS ASP***************************************
if Password = "test56" then
Session("authorized"
= 1
Response.redirect ("main.asp?UID=" & UserID & ""![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
else
Session("authorized"
= 0
Response.redirect ("entry.asp?ErMsg=Incorrect~Password"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
end if
PROTECTED PAGE ********************************************
if Session("authorized"
<> 1 then
Response.redirect ("entry.asp?ErMsg=Session~Timeout"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
end if
I now see the need to tighten up my security. As it is, the User ID gives users their account information. However, once in the protected area, you can easily change the UID in the address field on the browser to be a different number, and if that number is a valid UID, then someone else's account info displays.
I've tried doing the following:
PASSWORD PROCESS ASP***************************************
if Password = "test56" then
Session("authorized"
= UID
Response.redirect ("main.asp?UID=" & UserID & ""![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
else
Session("authorized"
= 0
Response.redirect ("entry.asp?ErMsg=Incorrect~Password"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
end if
PROTECTED PAGE ********************************************
if Session("authorized"
<> UID then
Response.redirect ("entry.asp?ErMsg=Session~Timeout"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
end if
However, everytime I try to login in I get thrown back to the entry.asp page with the message "Session Timeout". I figured this would work after the login page because if a user changes the UID number, the session value would still be the original UID, therefore when the changed UID didn't match it would throw them back to the sign in page.
Can anyone help?
Thanks!
Rexolio
PASSWORD PROCESS ASP***************************************
if Password = "test56" then
Session("authorized"
Response.redirect ("main.asp?UID=" & UserID & ""
else
Session("authorized"
Response.redirect ("entry.asp?ErMsg=Incorrect~Password"
end if
PROTECTED PAGE ********************************************
if Session("authorized"
Response.redirect ("entry.asp?ErMsg=Session~Timeout"
end if
I now see the need to tighten up my security. As it is, the User ID gives users their account information. However, once in the protected area, you can easily change the UID in the address field on the browser to be a different number, and if that number is a valid UID, then someone else's account info displays.
I've tried doing the following:
PASSWORD PROCESS ASP***************************************
if Password = "test56" then
Session("authorized"
Response.redirect ("main.asp?UID=" & UserID & ""
else
Session("authorized"
Response.redirect ("entry.asp?ErMsg=Incorrect~Password"
end if
PROTECTED PAGE ********************************************
if Session("authorized"
Response.redirect ("entry.asp?ErMsg=Session~Timeout"
end if
However, everytime I try to login in I get thrown back to the entry.asp page with the message "Session Timeout". I figured this would work after the login page because if a user changes the UID number, the session value would still be the original UID, therefore when the changed UID didn't match it would throw them back to the sign in page.
Can anyone help?
Thanks!
Rexolio