-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3 bug fixes #3
3 bug fixes #3
Conversation
yscumc
commented
Mar 27, 2013
- Added check for request.path to ensure idleFor parameter is processed only for session_security_ping url
- Assume a negative idleFor value means 0 to prevent a log out but if the value is negative
- Ignore non-integer idleFor values instead of throwing an exception
Added check for request.path to ensure idleFor parameter is processed only for session_security_ping url Assume a negative idleFor value means 0 to prevent a log out but if the value is negative Ignore non-integer idleFor values instead of throwing an exception
I think line 52 is too long and breaks PEP8, could you fix it ? You just need to pip install pep8 and run this command from the repo root: pep8 --exclude=tests,migrations --ignore=E124,E128 session_security Unit tests would be welcome too (in tests/middleware.py), else I'll do them. Really interresting commit BTW, thanks a heap ! |
Sorry I'm new to Git & GitHub, not sure how I would modify a pull request. Would I have to do a new pull request? Would it work if you merge it and fix it? Also, I just realized it may make more sense if the entire logic for checking |
On Thu, Mar 28, 2013 at 5:46 PM, yscumc [email protected] wrote:
Actually, you should have commited this in a branch. Anyway, you can just push new commits to the branch and the pull
Yes
But if this was moved to the ping view which is only requested by http://yourlabs.org |
Ah I came from the SVN world so it's more rare for branches. Seems like it's always about branching in Git. Anyway, I've committed the styling changes. Regarding moving the idleFor logic, I don't think it would make a difference, since the middleware would still update based on regular requests. What I mean is only the following section should be moved:
If |
PEP8 is not quite ready: $ pep8 --exclude=tests,migrations --ignore=E124,E128 session_security |
Ok I finally ran PEP8 and fixed the problems listed. Didn't know it was so easy, thanks for providing the command. |
Thanks ! Could you close the related issues ? |
Seems like the patch fails a lot of tests if I run it from within my project. Looks like the solution is to move the idleFor logic from the middleware into the view.
|
True, for the moment the tests are ment to be run from test_project. I'm trying to fix that in a local branch, but it is not a priority Right now I'm moving home but I will have internet tomorrow (in theory) so Thanks for your contribution, your curiosity, and your patience, well On Mon, Apr 1, 2013 at 9:45 PM, yscumc [email protected] wrote:
http://yourlabs.org http://blog.yourlabs.org |
Not at all, thank YOU for saving me tons of time by making this and for being so informative. |