laravel-debugbar icon indicating copy to clipboard operation
laravel-debugbar copied to clipboard

Issue with unserialization of the stored record when using PDO storage and unencrypted session

Open azgooon opened this issue 3 years ago • 1 comments

Hi,

I believe I came across the bug which can be reproduced when by disabling encryption of the session and using PDO as storage in laravel-debugbar. Precisely the issue occurs when I PUT the data to the controller and Requst Validator throws exception which also stores ErrorBag in the session. Debugbar saves collected data in the DB however when it comes to attempt of opening "past request" as soon as such record exists in the DB, debugar's AJAX request returns 500. After looking into the cause of the 500 error, I noticed that unserialization fails when unserializing session section following Illuminate\Support\ViewErrorBag part.

[2022-08-09 11:36:14] local.ERROR: unserialize(): Error at offset 3342 of 15746 bytes {"exception":"[object] (ErrorException(code: 0): unserialize(): Error at offset 3342 of 15746 bytes at /var/www/vendor/maximebf/debugbar/src/DebugBar/Storage/PdoStorage.php:106)

I am not sure if the issue should be raised in this project or https://github.com/maximebf/php-debugbar. Please advise.

Thanks

azgooon avatar Aug 09 '22 11:08 azgooon

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.

stale[bot] avatar Nov 02 '22 03:11 stale[bot]