mirror of
https://github.com/django/django.git
synced 2025-07-07 19:29:12 +00:00
[4.0.x] Avoided suggestion of plain text database password in sessions topic.
Backport of ccafad2e429468c518c80fb178f9e7a3f06e78e1 from main
This commit is contained in:
parent
fe59bf202d
commit
7753169585
@ -417,7 +417,7 @@ This simplistic view logs in a "member" of the site::
|
||||
|
||||
def login(request):
|
||||
m = Member.objects.get(username=request.POST['username'])
|
||||
if m.password == request.POST['password']:
|
||||
if m.check_password(request.POST['password']):
|
||||
request.session['member_id'] = m.id
|
||||
return HttpResponse("You're logged in.")
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user