From b50dd0a1eac89c3766ccbcb5718a5674d4372d76 Mon Sep 17 00:00:00 2001 From: HuYang Date: Thu, 24 Dec 2020 16:26:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=80=E4=B8=8Bredirecturl?= =?UTF-8?q?=3D=20=E7=9A=84=E6=83=85=E5=86=B5=EF=BC=8C=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC=E4=B8=8D=E8=A7=A3=E5=86=B3=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E5=BF=85=E9=A1=BB=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app_api/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app_api/views.py b/app_api/views.py index a1e1c66..8a60e48 100644 --- a/app_api/views.py +++ b/app_api/views.py @@ -30,6 +30,9 @@ def oauth0(request): randstr = request.GET.get("randstr","") hashstr = request.GET.get("hashstr","") redirecturl = request.GET.get("redirecturl","/") + if redirecturl == "" : + # 必须用判断的方式,否则url里提交redirecturl= 还是为空 + redirecturl = "/" if ("" in [username,timestamp,randstr,hashstr]) == False : # 都不为空,才验证哦 # 1 、验证timestamp的时效性