In the file key provider, if the file cannot be found, the error that gets returned is "The file DIR does not exist! Encrypt cannot retrieve encryption key." DIR is the directory, but it should be the file.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rlhawk’s picture

Status: Active » Needs review
FileSize
717 bytes

Here's a patch that fixes that error message.

rlhawk’s picture

Issue summary: View changes

Changed DIR placeholder in error message.

rlhawk’s picture

Note that without the patch from Issue #2077147, the error message will contain a double slash (//) if the directory entered in settings has a trailing slash.

rlhawk’s picture

Issue summary: View changes

Changed references to directory names and file names.

rlhawk’s picture

Issue summary: View changes
FileSize
690 bytes

Here's a slightly-better patch.

crashtest_’s picture

Status: Needs review » Needs work

When tested with encrypt_password, I tested by encrypting all of the passwords from one role, then moved the key file, then decrypted and encrypted the same passwords. I received the following error (does not include directory or filename):

The file does not exist! Encrypt cannot retrieve encryption key.

It seems it doesn't know the name of the file?

rlhawk’s picture

CrashTest_, I'm not able to replicate your experience and I'm not really clear on what you did. How were you able to decrypt the passwords with the key file moved?

crashtest_’s picture

Status: Needs work » Reviewed & tested by the community

Not sure what part of my configuration caused this to happen like this, but on a fresh install with everything patched, I get the expected results.

The file ../keys/encrypt_key.key does not exist! Encrypt cannot retrieve encryption key.

rlhawk’s picture

Status: Reviewed & tested by the community » Fixed

This is committed.

  • rlhawk committed 570018a on 7.x-2.x
    Issue #2077155 by rlhawk: Error should refer to the file instead of the...

Status: Fixed » Closed (fixed)

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