From 23716ebcc330968a4352b563c9aba52f08c00509 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Fri, 12 Feb 2016 12:23:22 +0100 Subject: [PATCH] Bug 15760 RMaint Avoid SQL injections For security purpose, backport a fix to the way the DB connection is established. --- Koha/Database.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Koha/Database.pm b/Koha/Database.pm index 5587570e23..3d20775148 100644 --- a/Koha/Database.pm +++ b/Koha/Database.pm @@ -52,7 +52,13 @@ sub _new_schema { # we are letting C4::Context->dbh not set the RaiseError handle attribute # for now for compatbility purposes - my $schema = Koha::Schema->connect( sub { C4::Context->dbh }, { unsafe => 1 } ); + my $schema = Koha::Schema->connect( + sub { C4::Context->dbh }, + { + unsafe => 1, + quote_names => 1, + } + ); return $schema; } -- 2.39.5