Skip to content

Commit

Permalink
SA-CORE-2022-013 by prudloff, tim.plunkett, Heine, effulgentsia, xjm,…
Browse files Browse the repository at this point in the history
… lauriii, longwave, larowlan
  • Loading branch information
xjm committed Jul 20, 2022
1 parent 2d5f47f commit 2d1a5f1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/Drupal/Core/Form/FormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,12 @@ protected function handleInputElement($form_id, &$element, FormStateInterface &$
// #access=FALSE on an element usually allow access for some users, so forms
// submitted with self::submitForm() may bypass access restriction and be
// 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.
if (!isset($element['#value']) && !array_key_exists('#value', $element)) {
Expand Down

0 comments on commit 2d1a5f1

Please sign in to comment.