From 635dd08dccc18b6eb5645d55ab4adf3ab8216f6a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 27 Feb 2007 16:09:15 +0000 Subject: [PATCH] =?utf8?q?Quoting=20Funktion=20f=C3=BCr=20Datumsangaben=20?= =?utf8?q?in=20sql=20queries.=20Beherrscht:=20-=20NULL=20fuer=20nicht=20de?= =?utf8?q?finierte=20Werte=20-=20current=5Fdate=20als=20Schl=C3=BCsselwort?= =?utf8?q?=20-=20Standardquoting=20fuer=20tainted=20strings=20(=C3=BCberno?= =?utf8?q?mmen=20aus=20DBI.pm)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Form.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SL/Form.pm b/SL/Form.pm index 0e59786d9..6a73aa415 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -239,6 +239,15 @@ sub quote_html { return $str; } +sub quote_db_date { + $main::lxdebug->enter_sub(2) and my ($self, $str) = @_; + $main::lxdebug->leave_sub(2) and return "NULL" unless defined $str; + $main::lxdebug->leave_sub(2) and return "current_date" if $str =~ /current_date/; + $str =~ s/'/''/g; + $main::lxdebug->leave_sub(2) and return "'$str'"; +} + + sub hide_form { my $self = shift; -- 2.20.1