Generating Unique Keys
Carl Banks
imbosol at vt.edu
Sat Jan 25 15:55:42 EST 2003
Peter Hansen wrote:
> Mongryong wrote:
>>
>> Right now, I mainly need a way to generate unique (web) session keys.
>> However, it would be nice to have a general purpose function for
>> generating unique keys.
>
> I may be missing something, but what would be wrong with incrementing
> a variable, starting at "1"?
>
> You haven't specified a requirement which looks like it would
> eliminate this as a possibility.
Because then a malicious user could easily get access to someone
else's web session, since they know keys are sequential. The
requirement wasn't stated, but it's generally a valid to assume the
webmaster doesn't want this to happen.
--
CARL BANKS
More information about the Python-list
mailing list