flow-development-collection icon indicating copy to clipboard operation
flow-development-collection copied to clipboard

Exception when sending a session cookie not available on the server

Open kdambekalns opened this issue 4 years ago • 4 comments

Description

Sending a session cookie not available on the server causes a very misleading exception.

Steps to Reproduce

  1. Send a session cookie that does not exist (e.g. because caches are flushed)

Expected behavior

Nothing "bad" happens, the application just works in whatever way it should or a login screen is shown.

Actual behavior

An exception caused by an "unserialize error at byte 0" was shown

Affected Versions

Flow: 7.1

kdambekalns avatar Sep 07 '21 13:09 kdambekalns

I've seen this issue around somewhere else, where the topic was similar: Avoid throwing an exception and insteadn "go silent". Can find the issue id ATM

sorenmalling avatar Sep 13 '21 13:09 sorenmalling

Found it the minute after hitting enter

Issue https://github.com/neos/flow-development-collection/pull/1132 PR https://github.com/neos/flow-development-collection/pull/2411

sorenmalling avatar Sep 13 '21 13:09 sorenmalling

Indeed similar - just that the above PR only checked for the format of the identifier and not if it actually exists. I wonder though why the backend in this case does not return false for the get() which would lead to the expected result @kdambekalns ? Which backend are you using?

See https://github.com/neos/flow-development-collection/blob/master/Neos.Cache/Classes/Frontend/VariableFrontend.php#L90-L94

albe avatar Sep 14 '21 10:09 albe

IIRC it's a file backend in that project… and I tried with a random Neos backend login, changing the session cookie simply gave me the login screen.

So it's either "fixed" by something in Neos (because I saw this in a pure Flow project), or it's something that project itself causes, unrelated to Flow. I'll investigate…

kdambekalns avatar Sep 14 '21 16:09 kdambekalns