From cf83e3825fe7cdb8c1bf3260c8ee36c1730556d7 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Wed, 23 Oct 2024 08:23:02 +0200 Subject: [PATCH] ensure key is cast to string, fixes #1435 --- CHANGELOG.md | 1 + lib/Request.php | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3f8cc01..377741f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * CHANGED: Simpler PostgreSQL table lookup query (#1361) * CHANGED: SRI hashes are now configurable, no longer hardcoded in templates (#1365) * CHANGED: Upgrading libraries to: DOMpurify 3.1.7 +* FIXED: Numeric array keys being cast to integer causing failures under strict type checking (#1435) ## 1.7.4 (2024-07-09) * CHANGED: Saving markdown pastes uses `.md` extension instead of `.txt` (#1293) diff --git a/lib/Request.php b/lib/Request.php index 336b69f1..4e6d1f1a 100644 --- a/lib/Request.php +++ b/lib/Request.php @@ -83,6 +83,7 @@ class Request { foreach ($_GET as $key => $value) { // only return if value is empty and key is 16 hex chars + $key = (string) $key; if (($value === '') && strlen($key) === 16 && ctype_xdigit($key)) { return $key; }