From b86a558a4f99c1b5264de01a19a2fbeafb2f3d83 Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 24 Jun 2024 09:06:04 +0200 Subject: [PATCH] allow numbers in table- and column-names --- api/src/Storage/Base.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Storage/Base.php b/api/src/Storage/Base.php index 00be712d13..cbd2a490f3 100644 --- a/api/src/Storage/Base.php +++ b/api/src/Storage/Base.php @@ -1099,7 +1099,7 @@ class Base { $order_by = $fragment; } - if (!preg_match_all("/(#?[a-zA-Z_.]+) *(<> *''|IS NULL|IS NOT NULL|& *\d+)? *(ASC|DESC)?(, *|$)/ui", $order_by, $all_matches) || + if (!preg_match_all("/(#?[a-z_][a-z0-9_.]+) *(<> *''|IS NULL|IS NOT NULL|& *\d+)? *(ASC|DESC)?(, *|$)/ui", $order_by, $all_matches) || $order_by !== implode('', $all_matches[0])) { error_log(__METHOD__."(".json_encode($fragment).") REMOVED");