From a139699e7e37ab00044a4d1b5d9b526343d2dc2f Mon Sep 17 00:00:00 2001 From: Markus Bauer Date: Fri, 7 Oct 2022 15:17:21 +0200 Subject: [PATCH] Include new "full_path" field in security hash as of PHP 8.1 --- lib/Cake/View/Helper/FormHelper.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index 0081b7754..376ce8d39 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -1803,6 +1803,9 @@ class FormHelper extends AppHelper { foreach (array('name', 'type', 'tmp_name', 'error', 'size') as $suffix) { $this->_secure($secure, array_merge($field, array($suffix))); } + if (version_compare(PHP_VERSION, '8.1.0', '>=')) { + $this->_secure($secure, array_merge($field, array('full_path'))); + } $exclude = array('name' => null, 'value' => null); return $this->Html->useTag('file', $options['name'], array_diff_key($options, $exclude));