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

Unhandled Magento\Framework\Serialize\Serializer\Json::(un)serialize calls #758

Closed
tzyganu opened this issue Jun 14, 2019 · 1 comment
Closed

Comments

@tzyganu
Copy link

tzyganu commented Jun 14, 2019

All calls to Magento\Framework\Serialize\Serializer\Json::unserialize and serialize are not wrapped in a try-catch block

Module version: 1.0.32.
The magento Magento\Framework\Serialize\Serializer\Json::unserialize and serialize methods throw an \InvalidArgumentException exception if for some reason json_encode or json_decode fail.
The mailchimp module does not handle these errors, resulting in 2 problems:

  • the log gets filled with "unable to (un)serialize value" rows
  • Some actions that call one of the extention methods will fail. (this is the worst part).

This issue has been reported before, but only partially.
I'm adding below the list of all the unsafe calls to serialize / unserialize.

Serialize:

Unserialize:

@gonzaloebiz gonzaloebiz self-assigned this Jul 15, 2019
@gonzaloebiz gonzaloebiz added this to the 10x.x.37 milestone Jul 15, 2019
gonzaloebiz added a commit that referenced this issue Jul 15, 2019
gonzaloebiz added a commit that referenced this issue Jul 15, 2019
gonzaloebiz added a commit that referenced this issue Jul 15, 2019
gonzaloebiz added a commit that referenced this issue Jul 15, 2019
gonzaloebiz added a commit that referenced this issue Jul 15, 2019
gonzaloebiz added a commit that referenced this issue Jul 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants