On 05-01-2010 at 10:40, Richard Hauswald wrote:
> Hello list,
> would it be better to default this value to 255 ? This is what most
> databases are doing. I'm asking this question cause this might be a
> entry point for DoS attacks in most applications. To avoid this, every
> Validate annotation must be provided with the maxlength value 255
> which is not convention over configuration and will cost a lot of time
> in a big project. For fields which needs to be longer the maxlength
> value can be defined so this change would not limit the maxlength
> generally.

Well actually, in JBoss I actually see a default of 250: String properties
are modeled as varchar(250) by default.

Also, it is a good practice to have no default at all: it forces you to think
about your data. Especially if it's going into a database, this is actually a
good thing IMHO.


Oscar

-- 
   ,-_
  /() ) Oscar Westra van Holthe - Kind      http://www.xs4all.nl/~kindop/
 (__ (
=/  ()  DRM "manages access" in the same way that a jail "manages freedom".

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to