I was examing the file 'functions_session_data.asp', and I come to this problem that can possible be a bug in the form how old sessions are removed from the application pool:
The box with '+++++' represent the position with expired sessions.
1st Iteration Removed = 0
+-----+ 1 | | +-----+ 2 |+++++| +-----+ 3 | | +-----+ 4 | | +-----+ 5 |+++++| +-----+
2nd Iteration Removed = 1 2 <- 5
+-----+ 1 | | +-----+ 2 |+++++| +-----+ 3 | | +-----+ 4 | | +-----+ 5 |+++++| +-----+
3rd and 4th Removed = 1
5th Iteration Removed = 2 5 <- 4
+-----+ 1 | | +-----+ 2 |+++++| +-----+ 3 | | +-----+ 4 | | +-----+ 5 | | +-----+
Then after this line: If intRemovedEntries > 0 Then ReDim Preserve sarySessionData(3, UBound(sarySessionData, 2) - intRemovedEntries)
the array of sessions hold become like this:
+-----+ 1 | | +-----+ 2 |+++++| +-----+ 3 | | +-----+
Removing 1 valid session and leaving 1 invalid session.
|
and if the new sid is equal to one found in the array of sessions the it hold lead to even more unfair removels, and possible an error in the redim of the vector...
this possibly affects all functions that use the elimination process
correct me if i'm wrong
Edited by Pancho - 10 January 2009 at 7:27pm