mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-12-28 20:55:39 +01:00
ensure key is cast to string, fixes #1435
This commit is contained in:
parent
93a2b97d69
commit
cf83e3825f
2 changed files with 2 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
* CHANGED: Simpler PostgreSQL table lookup query (#1361)
|
* CHANGED: Simpler PostgreSQL table lookup query (#1361)
|
||||||
* CHANGED: SRI hashes are now configurable, no longer hardcoded in templates (#1365)
|
* CHANGED: SRI hashes are now configurable, no longer hardcoded in templates (#1365)
|
||||||
* CHANGED: Upgrading libraries to: DOMpurify 3.1.7
|
* 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)
|
## 1.7.4 (2024-07-09)
|
||||||
* CHANGED: Saving markdown pastes uses `.md` extension instead of `.txt` (#1293)
|
* CHANGED: Saving markdown pastes uses `.md` extension instead of `.txt` (#1293)
|
||||||
|
|
|
@ -83,6 +83,7 @@ class Request
|
||||||
{
|
{
|
||||||
foreach ($_GET as $key => $value) {
|
foreach ($_GET as $key => $value) {
|
||||||
// only return if value is empty and key is 16 hex chars
|
// only return if value is empty and key is 16 hex chars
|
||||||
|
$key = (string) $key;
|
||||||
if (($value === '') && strlen($key) === 16 && ctype_xdigit($key)) {
|
if (($value === '') && strlen($key) === 16 && ctype_xdigit($key)) {
|
||||||
return $key;
|
return $key;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue