Python: Get rid of deprecated terms in code and .qhelp.

This commit is contained in:
Taus Brock-Nannestad
2020-06-19 16:51:09 +02:00
parent 2081d0cecc
commit 01fb1e3786
11 changed files with 18 additions and 18 deletions

View File

@@ -17,16 +17,16 @@ def unsafe2(request):
#Simplest and safest approach is to use a white-list
#Simplest and safest approach is to use an allowlist
@app.route('/some/path/good1')
def safe1(request):
whitelist = [
allowlist = [
"example.com/home",
"example.com/login",
]
target = request.args.get('target', '')
if target in whitelist:
if target in allowlist:
return redirect(target)
#More complex example allowing sub-domains.