Apply fastAuthenticate() everywhere doing client-server communication
This commit is contained in:
1 parent
7b9b6f05e5
commit
c53ef0c6e5
1 file changed
+24
@@ -626,6 +626,12 @@ def clientGetWorkload(request):
|
|||||||
if random.randrange(2) == 1:
|
if random.randrange(2) == 1:
|
||||||
return HttpResponse('None')
|
return HttpResponse('None')
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Authenticate using saved IP addresses
|
||||||
|
user, machine = fastAuthenticate(request)
|
||||||
|
|
||||||
|
except UnableToAuthenticate:
|
||||||
|
|
||||||
# Verify the User's credentials
|
# Verify the User's credentials
|
||||||
try: user = authenticate(request, True)
|
try: user = authenticate(request, True)
|
||||||
except UnableToAuthenticate: return HttpResponse('Bad Credentials')
|
except UnableToAuthenticate: return HttpResponse('Bad Credentials')
|
||||||
@@ -664,6 +670,12 @@ def clientWrongBench(request):
|
|||||||
# #
|
# #
|
||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Authenticate using saved IP addresses
|
||||||
|
user, machine = fastAuthenticate(request)
|
||||||
|
|
||||||
|
except UnableToAuthenticate:
|
||||||
|
|
||||||
# Verify the User's credentials
|
# Verify the User's credentials
|
||||||
try: user = authenticate(request, True)
|
try: user = authenticate(request, True)
|
||||||
except UnableToAuthenticate: return HttpResponse('Bad Credentials')
|
except UnableToAuthenticate: return HttpResponse('Bad Credentials')
|
||||||
@@ -705,6 +717,12 @@ def clientSubmitNPS(request):
|
|||||||
# #
|
# #
|
||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Authenticate using saved IP addresses
|
||||||
|
user, machine = fastAuthenticate(request)
|
||||||
|
|
||||||
|
except UnableToAuthenticate:
|
||||||
|
|
||||||
# Verify the User's credentials
|
# Verify the User's credentials
|
||||||
try: user = authenticate(request, True)
|
try: user = authenticate(request, True)
|
||||||
except UnableToAuthenticate: return HttpResponse('Bad Credentials')
|
except UnableToAuthenticate: return HttpResponse('Bad Credentials')
|
||||||
@@ -729,6 +747,12 @@ def clientSubmitError(request):
|
|||||||
# #
|
# #
|
||||||
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Authenticate using saved IP addresses
|
||||||
|
user, machine = fastAuthenticate(request)
|
||||||
|
|
||||||
|
except UnableToAuthenticate:
|
||||||
|
|
||||||
# Verify the User's credentials
|
# Verify the User's credentials
|
||||||
try: user = authenticate(request, True)
|
try: user = authenticate(request, True)
|
||||||
except UnableToAuthenticate: return HttpResponse('Bad Credentials')
|
except UnableToAuthenticate: return HttpResponse('Bad Credentials')
|
||||||
|
|||||||
Reference in new issue
Block a user