diff --git a/laravel/crypter.php b/laravel/crypter.php index c58c6b3a..f5113f34 100644 --- a/laravel/crypter.php +++ b/laravel/crypter.php @@ -141,7 +141,13 @@ class Crypter { return substr($value, 0, $length - $pad); } - throw new \Exception("Decryption error. Padding is invalid."); + // If the padding characters do not match the expected padding + // for the value we'll bomb out with an exception since the + // encrypted value seems to have been changed. + else + { + throw new \Exception("Decryption error. Padding is invalid."); + } } return $value;