I think therefore you could resolve the issue by doing
save(update_fields=['count']) in your code.
On 15 January 2015 at 06:31, Horacio G. de Oro wrote:
> Yeap. Removing the save() done in solved the issue.
>
> And some component is doing and update() - not a save(). I see in the
> Postgresql l
Yeap. Removing the save() done in solved the issue.
And some component is doing and update() - not a save(). I see in the
Postgresql logs an UPDATE of the hash with the new increment, that includes
only the "password" field.
I thought that autenticate() produced a read operation on the DB... n
I do something like.
# get the user to check tries
user = User.object.get(username=username)
assert user.count <= 3
# authenticate
authenticated_user = authenticate(...)
# auth failed
if not authenticated_user:
user.count++
user.save()
raise
As part of the authentication process, I increment/reset authentication
tries of the user. And to check this, I get the user from the DB before
doing the authentication. I think this is causing me the issue. I reset the
countre of login attempts in an instance of user that is different than the
I haven't tested the issue outside my project. But while debugging, I saw
the new hash in the user instance returned by authenticate(), but that new
hash never went to the database since I haven't done a 'save()' of the user
instance.
If you see the new hash in the database, I think that, maybe
Hi Horacio,
Thanks for the report. Unfortunately, I can't reproduce this issue.
My steps to reproduce using the project from the tutorial:
Bump PBKDF2PasswordHasher.iterations to a higher value
Login at /admin/
Confirm at /admin/auth/user/#/ that the password of the user I logged in as
reflects
Yes, there is an open ticket to update the documentation:
https://code.djangoproject.com/ticket/24019
If you're able to work on a patch, I'll be happy to review it.
On Wednesday, January 14, 2015 at 5:56:26 PM UTC-5, x13 wrote:
>
>
> According to Django 1.7 Docs, aggregation API is not working w
According to Django 1.7 Docs, aggregation API is not working with generic
relations
https://docs.djangoproject.com/en/1.7/ref/contrib/contenttypes/#generic-relations-and-aggregation
Bookmark.objects.aggregate(Count('tags')) # Not working according to Docs.
But this bug seems to be fixed in #
The problem is because the iterations in PBKDF2PasswordHasher where updated
to 15000, so it updates the password, but later,
SessionAuthenticationMiddleware detects a password change and PUF! the
login doesn't work.
Right new I've created a PBKDF2PasswordHasher implementation with
iteartions =
Hi Aymeric,
I got a chance to update my patch with the use of origins. The good news is
that it's simpler than the old implementation. I have a few api questions
below. The updated branch is here for now:
https://github.com/prestontimmons/django/compare/ticket-15053-origin?expand=1
As a quick re
10 matches
Mail list logo