Cookie Values getting truncated
Let me explain what I am doing first:
This is a basic session authentication, where I use cookies to store the login and password. Here is the order of events:
1)User Requests secure page
2)User is redirected to Login.asp
3)If cookies with login and password is available, I attempt to log the user in
4a)If authenticated, session variable is set and the user is immediately redirected to their destination...basically without knowing they were ever authenticated.
4b)If the user is not authenticated they are redirected back to Login.asp?action=BadAuthentication and prompted for login and password information.
The problem occurs between steps 3 and 4 when I get the password from the cookie. Occasionally the password gets truncated (for no apparent reason)...i.e. if the stored password is "abcdefgh" sometimes the script will read "abc".
This doesn't seem to occur with the login name, but I believe it may be due to the length of the cookie value. The password is encrypted and is usually around 32 charachters.
Has anyone else had this problem or know why this may be occuring?
Extra Info:
-using VBScript,
-using the same cookie for both login and password (i.e. Cookies(CookieName)("Password") and Cookies(CookieName)("UserName")
|