Problem/Motivation

Same thing that was reported on #2970955 when encrypting exists for when you try to decrypt non-string values with defuse/php-encryption >= 2.2.0.

TypeError: String expected for argument 1. Integer given instead. in Defuse\Crypto\Crypto::decrypt() (line 98 of /vendor/defuse/php-encryption/src/Crypto.php).

Proposed resolution

The 2.2.0 version of defuse/php-encryption introduced type checking. As we should only be passing string values Crypto::decrypt() the solution should be to just cast to a string.

Comments

dscl created an issue. See original summary.

dscl’s picture

Status: Needs work » Needs review
StatusFileSize
new763 bytes
dscl’s picture

Issue summary: View changes
dscl’s picture

Priority: Normal » Major
jfhovinne’s picture

Status: Needs review » Reviewed & tested by the community

Got the same fatal error; patch fixes the issue.

  • rlhawk committed 7f6ea15 on 8.x-2.x authored by dscl
    Issue #2973744 by dscl, jfhovinne: Fatal error in Crypto::decrypt() with...
rlhawk’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

manuel garcia’s picture

Just hit this, thanks for the patch. Since this is a major... can we get cut a new release for it please?

rlhawk’s picture

manuel garcia’s picture

Thanks!