]> git.koha-community.org Git - koha.git/commit
Bug 27715: Sanitize order by DT params
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 18 Feb 2021 14:49:40 +0000 (15:49 +0100)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Tue, 23 Feb 2021 17:52:15 +0000 (17:52 +0000)
commit6484aff04fd5808b0a73fee307bcea61c558f88f
tree0eae862c71425d423c49180416373634f0123d71
parente25080ff8fe69ab509307e81a0c419b041a701bd
Bug 27715: Sanitize order by DT params

We are not on the safe side when we build the ORDER BY clause from the
DataTables parameters.

I've started to limit the columns by using Koha::Objects->columns, but
for instance for the patron search we need (at least) the columns from
the branches, categories and members tables.
It seems easier, and still safe, to use a regex.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 0d1e5ea69b70292c89f827adaefc286fff8318a7)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
C4/Utils/DataTables.pm