Hash will only be there for the folder name.

e.g. int hash = computeHash(sessionId) % 100;
String folder = "" + hash + "/" + sessionId;

this way you will have 100 top level folders in which you'll have session
folders. This was it's much less likely to have 32k session in one folder.
Or you can also go multiple levels, compute hash from part of the session
id, etc.

-Matej

On Tue, Sep 16, 2008 at 11:17 PM, Johan Compagner <[EMAIL PROTECTED]>wrote:

> A hash doesnt have to be unique for the same string :)
> So when will the first be that has session leakage because of that
>
> On 9/16/08, Matej Knopp <[EMAIL PROTECTED]> wrote:
> > Another approach would be just counting hash from session id and mod it.
> >
> > -Matej
> >
> > On Tue, Sep 16, 2008 at 6:00 PM, Uwe Schäfer
> > <[EMAIL PROTECTED]>wrote:
> >
> >> Matej Knopp schrieb:
> >>
> >>> I had a quick glance at the patch. The folder hierarchy it creates
> seems
> >>> to
> >>> be quite deep, i'm not sure if that is necessary. Perhaps 3-4 levels
> >>> would
> >>> be enough? Also I'm afraid that this approach would leave lot of empty
> >>> folders.
> >>>
> >>
> >> well, that depends on the number of different chars the container uses
> in
> >> a
> >> session-id. i honestly don´t know if this is part of the spec.
> >> of course making every fourth char a / might be enough. it is just that
> >> i´ve seen this strategy in "squid".
> >>
> >> yeah, i did not take a look at removing yet. i´ll do in the evening.
> >>
> >> cu uwe
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to