|
@ -94,7 +94,19 @@ def new_one(): |
|
|
url = request.form.get('url') |
|
|
url = request.form.get('url') |
|
|
|
|
|
|
|
|
for name, ques, hint, ans in C.verify: |
|
|
for name, ques, hint, ans in C.verify: |
|
|
if request.form.get(name) != ans: abort(401) |
|
|
|
|
|
|
|
|
if request.form.get(name) != ans: |
|
|
|
|
|
return '''<html> |
|
|
|
|
|
<head> |
|
|
|
|
|
<meta charset='UTF-8'> |
|
|
|
|
|
<meta name='viewport' content='width=device-width initial-scale=1'> |
|
|
|
|
|
<title>错误</title> |
|
|
|
|
|
</head> |
|
|
|
|
|
<body> |
|
|
|
|
|
<h1>验证问题回答错误</h1> |
|
|
|
|
|
<a href="##" onclick="window.history.back()">回退</a> |
|
|
|
|
|
</body> |
|
|
|
|
|
</html> |
|
|
|
|
|
''', 401 |
|
|
|
|
|
|
|
|
if not content or len(content)>4000: abort(422) |
|
|
if not content or len(content)>4000: abort(422) |
|
|
if private and len(private)>1000: abort(422) |
|
|
if private and len(private)>1000: abort(422) |
|
|