修复账号密码登录和扫码登陆 #2
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#1
基本的登录、登出功能都正常了(logout_all登出所有设备还不能用),OCR模型已经重新针对新的验证码进行训练。
验证码数据集,解压密码
NJU1. urls.py
/qrCode/get?ts=%d/qrCode/getToken?ts=%d/qrCode/code?uuid=%s/qrCode/getCode?uuid=%s/qrCode/status?ts=%d&uuid=%s/qrCode/getStatus.htl?ts=%d/captcha.html?ts=%d/getCaptcha.htl?%d/checkNeedCaptcha.htl(新增)2. pwdLogin.py(密码登录)
pwdDefaultEncryptSalt改为 hidden input#pwdEncryptSaltcheckNeedCaptcha.htl判断是否需要验证码,不需要时跳过captchaResponse→captchaxpath[0]硬编码改为get_field()容错"图形动态码错误",错误提取增加回退 xpath3. QRlogin.py(二维码登录)
params={"uuid": ""}参数3(二维码失效)cllt: "qrLogin",dllt改为从页面取值(generalLogin),取值方式改为get_field()容错4. base.py(登录状态判断)
平台升级后,已登录用户访问
index.do会被重定向到/personalInfo/personCenter/index.html,而不是停留在index.do。未登录用户则会被重定向到登录页/authserver/login。修复方式:将"URL 等于 index"改为"URL 不是登录页"。