Skip to content

1.0.29 (0d626e4)

Choose a tag to compare

@github-actions github-actions released this 12 May 06:47
· 2 commits to main since this release
fix: 手动 follow redirect 解决 iOS HTTPS→HTTP 降级丢 cookie 问题

iOS URLSession 自动 follow redirect 时,跨域 HTTPS(ids) → HTTP(identity/lms)
的降级会被静默拦截,导致 CAS 验证链没走完,role_token cookie 不会被设置,
最终用着匿名的 session cookie 调 API 返回 302。

修复:
- 新增 followAllRedirectsManually,用主 session (带 NoRedirectDelegate) 手动
  跟踪 301-308 全部重定向,最多 20 跳
- 登录后必须检测到 role_token cookie(仅 CAS 验证成功后才会设置),否则报错
- 仍保留登录后 API 测试调用作为最终验证

经 simulator + 注入 Python 有效 cookie 验证整套 UI 流程正常:
- ✅ Dashboard / 课表 / 历史 / 设置 全部正常加载
- ✅ Center WebSocket 连接
- ✅ 设置页显示真实姓名(鲁同轩)和学号
- ✅ 历史 tab 显示完整签到记录 + 78% 出勤率