genecommerce / module-encryption-key-manager

Tooling to help generate and invalidate magento encryption keys
GNU Lesser General Public License v3.0
70 stars 14 forks source link

core_config_data is not properly decrypted/encrypted. #61

Open edgyd opened 2 months ago

edgyd commented 2 months ago

Hi, On gene:encryption-key-manager:generate --force config values are not properly decrypted and re-encrypted, which results in empty config values in admin. Copying back old values and running gene:encryption-key-manager:reencrypt-unhandled-core-config-data results:

config_id: 689
scope: default
scope_id: 0
path: recaptcha_frontend/type_recaptcha_v3/public_key
updated_at: 2024-09-24 13:33:43
ciphertext_old: 0:3:wp1yvgIhLL/raLD5/phrd.......................
plaintext: 
ciphertext_new: 2:3:soPJ0icPYPNJPfPAuXDR7BJIMCXTfuqXeoGFMg==
Dry run mode, no changes have been made

Other table re-encryption is running smoothly, only core_config_data table.

pingiun commented 5 days ago

I found the same thing, the core_config_data command reports all empty plaintexts

convenient commented 5 days ago

@pingiun if you have any debugging and are able to figure it out please share information. This suggests that the values could not be decrypted, which makes little sense to me as these values should be the ones booting most of magento and should be handled by default pretty well.

pingiun commented 5 days ago

@convenient It may actually be the case that I imported the crypt key wrong to my local environment. I will test the module in a staging environment soon, where it may work

convenient commented 5 days ago

Ahhh that may be the case! if you are not running on the actual environment you may also want to consider flushing the cache, as well as opcache if you have env.php tracked in that.