Possible bug
Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=26815
Printed Date: 03 April 2026 at 12:11am Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Possible bug
Posted By: Pancho
Subject: Possible bug
Date Posted: 09 January 2009 at 11:57pm
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
|
Replies:
Posted By: WebWiz-Bruce
Date Posted: 12 January 2009 at 9:35am
This will be looked at to see if the same problem can be found.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
Posted By: Pancho
Date Posted: 13 January 2009 at 6:21pm
Posted By: WebWiz-Bruce
Date Posted: 14 January 2009 at 8:35am
It was looked into and found that valid sessions could be removed, particularly as moved invalid sessions were included in the iteration which could create an invalid removal count.
To fix the issue the session removal code has been changed to use an last good session array pointer instead. When moving an oputdated session to the end of the array it first checks that the position it is being moved to does not contain an outdated session, if it does it moves to the next array position. It also does not re-check outdated moved sessions.
------------- https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting
|
|