- π―π΅Japan ptmkenny
Drupal 7 is EOL (end of life) so 7.x issues are now being closed.
 
tl;drβFieldEncryptDatabaseCache::prepareItem will return false for the data of a cached item if decryption failed due to exceptions getting blocked in field_encrypt_decrypt
Here is what happened:
FieldEncryptDatabaseCache::prepareItem on the cache item. $cache->data is set to the encrypted serialized data. The cache is OK so we don't ignore it. Next, decryption occurs.
$this->encrypt() which in turn calls  field_encrypt_decrypt. Herein lies the problem.
Exception is caught on line 325 and then null is returned on line 326. The exception is handled.
catch block doesn't get called because the Exception thrown during decryption was already handled in field_encrypt_decrypt. Yuck.
$cache->data gets set to unserialize(null); aka false.
The impact that this caused us was that a call to field_info_field_map returned false while processing in Lockr's field encrypt override module. This then caused massive pain and downtime as now more and more fields became cached and encrypted, compounding the problem.
However, it seems like this needs to be fixed anyway such that a cache failure checks for a bad decrypt and fails the cache rather than setting false.
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Drupal 7 is EOL (end of life) so 7.x issues are now being closed.