SetData action check for if a field exists may fail with false positives

Created on 14 February 2024, 9 months ago
Updated 28 February 2024, 9 months ago

Problem/Motivation

The SetData action access check uses the WebformSubmission::getElementData method to determine if an element exists. Some element's values may be null.

Steps to reproduce

  1. Set up a webform with a Value element.
  2. Create a new ECA model that creates a new submission and attempts to set the Value element.
  3. Notice that access will be denied.

Proposed resolution

Use WebformSubmission::getWebform()->getElement() instead to check if an element exists.

Remaining tasks

  1. Confirm the issue exists.
  2. Open a MR.
  3. Review.
  4. Merge.

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States luke.leber Pennsylvania

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024