Skip to content
Snippets Groups Projects
Verified Commit cbbe3c56 authored by Jess's avatar Jess
Browse files

SA-CORE-2022-013 by prudloff, tim.plunkett, Heine, effulgentsia, xjm, lauriii, longwave, larowlan

(cherry picked from commit 80c94265)
parent 0b4f0cda
No related branches found
No related tags found
No related merge requests found
...@@ -1217,7 +1217,12 @@ protected function handleInputElement($form_id, &$element, FormStateInterface &$ ...@@ -1217,7 +1217,12 @@ protected function handleInputElement($form_id, &$element, FormStateInterface &$
// #access=FALSE on an element usually allow access for some users, so forms // #access=FALSE on an element usually allow access for some users, so forms
// submitted with self::submitForm() may bypass access restriction and be // submitted with self::submitForm() may bypass access restriction and be
// treated as high-privilege users instead. // treated as high-privilege users instead.
$process_input = empty($element['#disabled']) && !in_array($element['#type'], ['item', 'value'], TRUE) && (($form_state->isProgrammed() && $form_state->isBypassingProgrammedAccessChecks()) || ($form_state->isProcessingInput() && (!isset($element['#access']) || $element['#access']))); $process_input = empty($element['#disabled']) &&
!in_array($element['#type'], ['item', 'value'], TRUE) &&
(
($form_state->isProgrammed() && $form_state->isBypassingProgrammedAccessChecks()) ||
($form_state->isProcessingInput() && (!isset($element['#access']) || (($element['#access'] instanceof AccessResultInterface && $element['#access']->isAllowed()) || ($element['#access'] === TRUE))))
);
// Set the element's #value property. // Set the element's #value property.
if (!isset($element['#value']) && !array_key_exists('#value', $element)) { if (!isset($element['#value']) && !array_key_exists('#value', $element)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment