Prutkar wrote:
I've implemented "original Gram AOL hack"

sounds nice

and my guests number dropped about 2/3 (visitor count is much more accurate right now I think).
Thanks Peter!
I appreciate you reporting your results.
Quote:
I would adjust Step (3) in a way that new session_id hash would be based on IP+rand+time+previous_session_id somehow, and implement mechanism/function to allow recreation of past few session_ids, that way if users arrives with old(er) session_id because of TCP problems, Joomla can still authenticate. Is that even possible and feasible?
Or may be simply remember past 5 session_ids and their expiration time in database?
It kind of defeats the rolling mechanism, by allowing a previous session to authenticate. But would be do-able. The less previous sessions allowed, the stronger it becomes....
It also requires a QUERY - Compare, where we now just have a query, so if used, would need to be subsequent to a failed initial query (looking for current session id).
However, this could be done by adding one field to the database, and converting the query to a query compare. If a sessionid remained constant, and we added an auth_id field, we could serialize an array of acceptable auth_id's, in order of use, to be compared against. On success, we pop the array to roll one off, add the new one and proceed with update.
This could actually provide a mechanism for deploying a rolling session value without verifying that the client had recieved an updated auth_id from the last page request (for TCP failure). By keeping the last assigned auth_id and the auth_id it replaced, we could confirm the client was in posession of one of the last two assigned auth_id's , roll the values and save. Client could authenticate with either of the last two assigned auth_ids, which would constantly roll with the page requests.
We are already doing an update, so only added overhead is the compare, and pop and replace.
GRAM