0
votes
14
views
Understanding Google reCAPTCHA in Django
posted at July 12, 2018, 3:13 p.m. - 1 month ago

Understanding Google reCAPTCHA in Django. I found this awesome answer to simply understand how to use API from Google reCAPTCHA. import urllib, urllib2 def recaptcha(request, postdata): rc_challenge = postdata.get('recaptcha_challenge_field', '') ...

api security python django
0
votes
15
views
Understanding @user_passes_test Django
posted at July 12, 2018, 3:13 p.m. - 1 month ago

Django decorator has a function to manage the user, once of it is user_passes_test. But, in my implementation i found this problem: ERR_TOO_MANY_REDIRECTS, or ‘AnonymousUser’ object is not iterable. I ...

python security django
0
votes
12
views
Django: Custom safe excludes from dangerous XSS Injection
posted at July 12, 2018, 3:13 p.m. - 1 month ago

Django Custom safe excludes from dangerous XSS Injection. Answered from: http://stackoverflow.com/a/41434870/6396981 from bs4 import BeautifulSoup from django import template from django.utils.html import escape register = template.Library() INVALID_TAGS = ['script', 'style'] ...