noir-clojure/noir

flash sessions: new value for key not accessible if modified

Closed this issue · 1 comments

If you put a key :foo into the flash session and then add a different value to :foo on the next request, trying to access :foo within the same request results in the :foo value from the original request.

Looking at the code, this is because flash-get looks for a key in incoming first and only looks in outgoing if it doesn't exist there. Was this on purpose? It seems like it would make more sense to prefer outgoing, since it will always have the latest values of keys.

Nope, not on purpose and sounds right to me. Have at it! :D