Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SYLU进行边缘适配后依旧无法正常登陆 #43

Open
DazeCake opened this issue Mar 23, 2022 · 6 comments
Open

SYLU进行边缘适配后依旧无法正常登陆 #43

DazeCake opened this issue Mar 23, 2022 · 6 comments

Comments

@DazeCake
Copy link

报错

显示登陆表单错误

边缘情形

fromIdx

根据doc教程,值为2,也尝试了使用localEdgeCasesFile修改为0-3的所有值,均无法登陆

具体边缘配置

{
  "沈阳理工大学": {
    "formIdx": 2,
    "checkCaptchaPath": "/checkNeedCaptcha.htl",
    "getCaptchaPath": "/toSliderCaptcha.htl"
  },
  "CLOUD": {
    "getLtPath": "/security/lt",
    "getCaptchaPath": "/generateCaptcha",
    "submitCaptchakey": "captcha"
  },
  "NOTCLOUD": {
    "submitCaptchakey": "captcha",
    "getCaptchaPath": "/getCaptcha.htl",
    "verifySliderCaptchaPath": "/verifySliderImageCode.do",
    "checkCaptchaPath": "/checkNeedCaptcha.htl",
    "formIdx": 2,
    "pwdEncrypt": true
  }
}

环境信息

OS: Ubuntu 20.04
node: v16.0.0
school: 沈阳理工大学
schoolId: 237650c2-30ec-4d11-86d6-32fc44695f30
url: http://authserver.sylu.edu.cn/authserver/login

@DazeCake
Copy link
Author

一个猜想,接口获取的url内容为一个域名https://authserver.sylu.edu.cn/authserver ,而似乎该内容被重定向至http://authserver.sylu.edu.cn/authserver/login

是否有可能cea依旧在旧url尝试登录导致了表单错误呢

@beetcb
Copy link
Contributor

beetcb commented Apr 11, 2022

久等啦 (●'◡'●),不是重定向的问题,大家都是会重定向的,所以 cea 是考虑进去了这点的

我看了看网页结构,你的配置都没问题,就剩下获取滑块验证码的接口是 /common/openSliderCaptcha.htl,其它真没看出来问题

这就很奇怪了,核心逻辑在这里:

hiddenInputList.each((e: number) => {
const hiddenInputNode = hiddenInputList[e]
const [name, value] = [
hiddenInputNode.attribs.name,
hiddenInputNode.attribs.value,
]
if (name && value) {
hiddenInputNameValueMap[name] = value
} else if (value) {
// password salt here
pwdSalt = value
}
})
if (!pwdSalt) {
log.error({
message: `登录表单有误(当前 formIdx = ${school.edgeCase.formIdx})`,
suffix: `@${name}`,
})
return
}

@DazeCake 我找个时间本地 DEBUG 试试

@DazeCake
Copy link
Author

全段时间和朋友研究了一下,好像是https证书验证不通过的问题,可能需要代理或者把他那个验证给关掉

@beetcb
Copy link
Contributor

beetcb commented Apr 11, 2022

image

奇怪了,我能拿到 pwdSalt 的值,也就是说不会报你的这个错

@beetcb
Copy link
Contributor

beetcb commented Apr 11, 2022

image

@DazeCake 这是我填的配置和结果

@DazeCake
Copy link
Author

靠,这也太奇怪了,我再试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants