Follow-up to #2831576: Remote post handler should use only submitted values as payload.

Problem/Motivation

Form element keys should not be allowed to use any field definition names or common keywords like 'preview' or 'complete'

See: http://cgit.drupalcode.org/yamlform/tree/src/Entity/YamlFormSubmission.p...

Proposed resolution

Add validation handling to block form elements from using reserved keys (aka field definitions)

Comments

jrockowitz created an issue. See original summary.

jrockowitz’s picture

StatusFileSize
new59.58 KB

I have decide to just warn users via the UI when they are using a reserved key.

Below is the current list of reserved keys

  • form_build_id
  • form_token
  • form_id
  • data
  • op
  • serial
  • sid
  • uuid
  • token
  • uri
  • created
  • completed
  • changed
  • in_draft
  • current_page
  • remote_addr
  • uid
  • langcode
  • yamlform_id
  • entity_type
  • entity_id
  • sticky
  • notes

Here is a screenshot of the warning.

jrockowitz’s picture

Category: Bug report » Task
Status: Active » Needs review
StatusFileSize
new3.35 KB

Status: Needs review » Needs work

The last submitted patch, 3: add_validation_handling-2831754-3.patch, failed testing.

  • jrockowitz committed 03dc4e6 on 2831754-reserved-keys
    Issue #2831754 by jrockowitz: Add validation handling to block form...

  • jrockowitz committed 87bf414 on 2831754-reserved-keys
    Issue #2831754 by jrockowitz: Add validation handling to block form...
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new3.3 KB

  • jrockowitz committed 8631358 on 8.x-1.x
    Issue #2831754 by jrockowitz: Add validation handling to block form...
jrockowitz’s picture

Status: Needs review » Fixed

Status: Fixed » Needs work

The last submitted patch, 7: add_validation_handling-2831754-7.patch, failed testing.

jrockowitz’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.