Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Possible bug
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Possible bug

 Post Reply Post Reply
Author
Pancho View Drop Down
Newbie
Newbie


Joined: 26 March 2005
Location: Portugal
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pancho Quote  Post ReplyReply Direct Link To This Post Topic: Possible bug
    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 wrongConfused


Edited by Pancho - 10 January 2009 at 7:27pm
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 12 January 2009 at 9:35am
This will be looked at to see if the same problem can be found.
Back to Top
Pancho View Drop Down
Newbie
Newbie


Joined: 26 March 2005
Location: Portugal
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote Pancho Quote  Post ReplyReply Direct Link To This Post Posted: 13 January 2009 at 6:21pm
what are the results :P?
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.


Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.