Skip to content

Commit

Permalink
Reset the random seed
Browse files Browse the repository at this point in the history
Because the random seed is set and returned in the refresh interface, if used by other services, it may cause the random to be calculated.
  • Loading branch information
ibuler committed Sep 19, 2023
1 parent 9d94c6d commit dcf1ccd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion captcha/views.py
Expand Up @@ -134,7 +134,7 @@ def captcha_image(request, key, scale=1):
response = HttpResponse(content_type="image/png")
response.write(out.read())
response["Content-length"] = out.tell()

random.seed()
return response


Expand Down

0 comments on commit dcf1ccd

Please sign in to comment.