From 5c5bf4e520c38367a6cd6e68deb9ecfcfa1ff432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20L=C3=A9cluse?= <laurent.lecluse@unicaen.fr> Date: Mon, 17 Feb 2025 15:08:11 +0100 Subject: [PATCH] =?UTF-8?q?[Fix]=20tableAjaxData=20:=20lorsque=20la=20tail?= =?UTF-8?q?le=20du=20tableau=20est=20ind=C3=A9finie,=20on=20retourne=20100?= =?UTF-8?q?00=20=C3=A9l=C3=A9ments=20max.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 7 +++++++ src/Util.php | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60ea6c2..a744c65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ CHANGELOG ========= +6.3.2 (17/02/2025) +------------------ + +- [Fix] tableAjaxData : lorsque la taille du tableau est indéfinie, on retourne 10000 éléments max. + + + 6.3.1 (22/01/2025) ------------------ diff --git a/src/Util.php b/src/Util.php index 8b64f49..e8d1868 100644 --- a/src/Util.php +++ b/src/Util.php @@ -15,6 +15,10 @@ class Util $orderCol = $post['orderCol'] ?? null; $orderDir = ($post['orderDir'] ?? 'asc') == 'asc' ? 'asc' : 'desc'; + if (!is_int($size)){ + $size = 10000; + } + if ($orderCol && (str_contains($orderCol, '"') || str_contains($orderCol, "'"))){ $orderCol = null; // protection contre les injections } -- GitLab