genecommerce / module-encryption-key-manager

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

Fix #40 #42

Closed convenient closed 1 month ago

convenient commented 1 month ago

Gene\EncryptionKeyManager\Service\ReencryptEnvSystemConfigurationValues::iterateSystemConfig(): Argument https://github.com/genecommerce/module-encryption-key-manager/pull/1 ($systemConfig) must be of type array, null given, called in app/code/Gene/EncryptionKeyManager/Service/ReencryptEnvSystemConfigurationValues.php on line 49

https://github.com/genecommerce/module-encryption-key-manager/issues/40

Ensure we only ever handle situations where the system config is provided.

Before fix

$ php bin/magento gene:enc:generate --force --skip-saved-credit-cards
A new key will be generated for re-encryption, use "--key" to specify a custom key.
The system currently has 25 keys
Generating a new encryption key using the magento core class
_reEncryptSystemConfigurationValues - start
_reEncryptSystemConfigurationValues - end
_reEncryptCreditCardNumbers - skipping
reEncryptEnvConfigurationValues - start
Gene\EncryptionKeyManager\Service\ReencryptEnvSystemConfigurationValues::iterateSystemConfig(): Argument #1 ($systemConfig) must be of type array, null given, called in /var/www/html/module-encryption-key-manager/Service/ReencryptEnvSystemConfigurationValues.php on line 49

After fix

$ php bin/magento gene:enc:generate --force --skip-saved-credit-cards
A new key will be generated for re-encryption, use "--key" to specify a custom key.
The system currently has 26 keys
Generating a new encryption key using the magento core class
_reEncryptSystemConfigurationValues - start
_reEncryptSystemConfigurationValues - end
_reEncryptCreditCardNumbers - skipping
reEncryptEnvConfigurationValues - start
reEncryptEnvConfigurationValues - end
Cleaning cache
Done