[CDBI] Re: how can I make data returned from CDBI methods be considered untainted?

Edward J. Sabol sabol at alderaan.gsfc.nasa.gov
Fri Mar 2 20:18:43 GMT 2007

Charlie Katz wrote:
> In my mod_perl application, I trust the data CDBI is giving me
> from my database (SQLite), so I would like it not to be considered
> tainted. In my CDBI application base class, after setting up the
> connection to the database, I say
> __PACKAGE__->db_Main->{Taint} = 0
> But the data are still coming out marked tainted. Should this work,
> or am I missing something?

I don't know, but I would probably try a different tack and override the
_default_attributes method instead, like so:

	sub _default_attributes {
		my $class = shift;
		return (
			Taint => 0,

Hope this helps,

More information about the ClassDBI mailing list