Commit ea358eb3 authored by Taylor Otwell's avatar Taylor Otwell

cleaning up code.

parent b262e743
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment