Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add decrypt option to cache:view command #1255

Merged
merged 7 commits into from
Aug 16, 2023

Conversation

cmuench
Copy link
Member

@cmuench cmuench commented Aug 7, 2023

Magerun pull-request check-list:

  • Pull request against develop branch (if not, just close and create a new one against it)
  • README.md reflects changes (if any)
  • phar fuctional test (in tests/phar-test.sh)

Fixes #1254

Changes proposed in this pull request:

  • Add decrypt option
  • Use Magento standard Decryptor

@cmuench cmuench changed the title Feature/1254 cache view decrypt Add decrypt option to cache:view command Aug 7, 2023
@github-actions
Copy link

github-actions bot commented Aug 7, 2023

Download the artifacts for this pull request:

@cmuench
Copy link
Member Author

cmuench commented Aug 7, 2023

@damienwebdev Did some experimental tests by including the standard encryptor.

n98-magerun2.phar cache:view --decrypt --unserialize SYSTEM_SCOPES

prints this on my dev machine:

{
    "websites": {
        "admin": 1,
        "0": 1,
        "base": 1,
        "1": 1
    },
    "stores": {
        "admin": 1,
        "0": 1,
        "default": 1,
        "1": 1
    }
}

Sadly n98-magerun2.phar cache:view --decrypt --unserialize SYSTEM fails, because of some data in the cache.

@cmuench cmuench force-pushed the feature/1254-cache-view-decrypt branch from df76ec4 to 6eed7cb Compare August 15, 2023 10:22
@cmuench
Copy link
Member Author

cmuench commented Aug 15, 2023

Found the issue in some data of the "application_key".

image

@cmuench
Copy link
Member Author

cmuench commented Aug 15, 2023

Seems that not alle config values are "json encodable". So we should skip the --unserialize option there. I see currently now way to handle that automatically.
The new version will print a hint and the Json Exception Message.

@cmuench cmuench marked this pull request as ready for review August 15, 2023 11:31
Key is not available after cache flush
Differences between Magento versions
@cmuench cmuench merged commit 3a48682 into netz98:develop Aug 16, 2023
10 checks passed
@cmuench cmuench added this to the 7.2.0 milestone Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: add support for decrypting the result of a cache:view
1 participant