On Dec 14, 12:15 am, Laurie <
laurie.harper...@gmail.com> wrote:
> I'm new to TurboGears so perhaps this is expected, but it took me a
> while to figure out what was going wrong. Basically, whenever I add
> @validation to a controller method, the method's keyword arguments
> seem to get 'augmented'. This is leading to data corruption as
> database columns get overwritten with defaul/empty values.
Since the keyword arguments are based on user input, I would say that
basically you should never be trusting it when it comes to which
columns in the database to edit. This is a heavily wrapped, heavily
abstracted version of SQL injection attacks. If this is an internal
app with no malicious or incompetent users then I can see why you
might want to do it this way, however.
But, if the validator is actually adding a keyword argument, it makes
me wonder what would happen if you explicitly defined that keyword
argument for some other purpose. Maybe someone else can shed some
light on the matter.
--
Ben Sizer