Website can't work with encrypted data without the key

Created on 15 August 2022, over 2 years ago
Updated 24 September 2024, 7 months ago

Problem/Motivation

When I want to use my website with encrypted data and without the encryption key I have an error.

Steps to reproduce

Import sql dump with encrypted user data. Restart and go to the website

Proposed resolution

Patche add

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

2.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇯🇵Japan ptmkenny

    In EncryptionMethodInterface, this is the phpdoc for the decrypt method:

      /**
       * Decrypt text.
       *
       * @param string $text
       *   The text to be decrypted.
       * @param string $key
       *   The key to decrypt the text with.
       *
       * @return string
       *   The decrypted text
       *
       * @throws \Drupal\encrypt\Exception\EncryptException
       *   Thrown when decryption fails.
       * @throws \Drupal\encrypt\Exception\EncryptionMethodCanNotDecryptException
       *   The method should throw this exception when the plugin can not decrypt
       *   (i.e. use a public key).
       */
      public function decrypt($text, $key);
    

    According to the interface, we have to return the decrypted text. So if you want to change this behavior, you need to make a feature request upstream with the Encrypt module. Once the interface is changed, then we can change the behavior here.

Production build 0.71.5 2024