perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Peters <mpet...@plusthree.com>
Subject Re: Any success with storing photos in a database? (prevents double-submits)
Date Wed, 15 Oct 2008 17:51:21 GMT
Mark Stosberg wrote:

> At one point in the past I did a variation of this where we put the next ID of
> a related database sequence in the form, and this would become the new primary
> key when inserted, and it would of course not allow the same primary key to be
> used twice. That worked, but I realized was open to abuse if a user tweaked the
> number to be larger than the sequence. Then, eventually a legitimate user would
> eventually be assigned that value by the sequence, and it would fail. 
> 
> Are their specific modules that you recommend to help with this?

You can try a UUID (look at Data::UUID). It's not sequential, but someone could still tweak
the form 
to create a value that could potentially conflict with another value in the future. But I'd
say it's 
much less likely than a sequential id.

-- 
Michael Peters
Plus Three, LP


Mime
View raw message