diff --git a/src/Illuminate/Encryption/Encrypter.php b/src/Illuminate/Encryption/Encrypter.php index 5a8d82ec9ec6..8a8c6d85b0fc 100755 --- a/src/Illuminate/Encryption/Encrypter.php +++ b/src/Illuminate/Encryption/Encrypter.php @@ -205,6 +205,10 @@ protected function hash($iv, $value) */ protected function getJsonPayload($payload) { + if (! is_string($payload)) { + throw new DecryptException('The payload is invalid.'); + } + $payload = json_decode(base64_decode($payload), true); // If the payload is not valid JSON or does not have the proper keys set we will