After Setting the Fields to encrypt the Form Breaks

Created on 20 September 2023, about 1 year ago

Problem/Motivation

After selecting the fields for a Entity Type at "Encrypted fields entity type settings", the form breaks, and you cannot add/edit fields

Steps to reproduce

Install Real AES ( https://www.drupal.org/project/real_aes β†’ )

Create a Key with:

  1. Type: Encryption
  2. Size: 256
  3. Provider: Config
  4. Value: 32 character key

In /admin/config/system/encryption/profiles, add an Encryption Profile with: Encryption Method Authenticated AES

Add the key created, go to the test option for the Encryption Profile to verify encryption/decryption of information

In admin/config/system/field-encrypt you can set the Profile Encryption to the Profile just created, configured and tested.

Go to Encrypted fields entity type settings select an Entity Type and configure a couple fields.

After you configure the fields, try to configure additional fields for that Entity Type.

The form will throw an Ajax error and won't display the additional fields

Proposed resolution

After some testing, getEncryptionProfilesTable generates a NULL value for encrypted_field_storage__encryption_profile, which eventually breaks the form. By filtering the NULL values, we can prevent this problem. I am attaccing a patch.

πŸ› Bug report
Status

Active

Version

3.1

Component

User interface

Created by

πŸ‡²πŸ‡½Mexico jaimeah

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