Closed ereOn closed 11 years ago
This is a somewhat tricky bug to test, as I haven't been able to create a TestCase reproducing it (a standalone app worked fine though). If you have some spare time, please checkout the latest master branch and see if that fixes your problem. I've written a minimal app to reproduce the bug in regenerate_on_first_request.py
as well.
I could indeed reproduce the bug with my current installed version (not master
), with your regenerate_on_first_request.py
sample and with the following shell command :
curl http://localhost:5000
With the master
branch including your fix, the bug doesn't occur anymore.
Do you have any idea when you intend to release that fixed version ?
Anyway, thank you for your fix and congratulations for your work. This library is a nice piece of code.
Thanks.
I just released 0.3.2 on PyPI - you could do me a big favor by checking if everything works okay.
Works on my side with the 0.3.2 version.
Thank you very much.
I recently faced the following error:
When calling
session.regenerate()
in my flask project. I guess this issue is very similar to this one.This happens when
session.regenerate()
is called on the first request. Whether it is aGET
orPOST
doesn't matter, and the aforementioned error is raised.Adding:
Before the call fixes the issues, but is hardly a long-term and clean solution.
I understood the rationale of raising an error when the programmer makes a mistake, however it doesn't seem like calling
regenerate()
on a first request is a mistake. Or is it ?I see no way of checking whether a session exists so its quite hard to avoid.