|
|
fda7515263
|
refactor: 移除注册验证码,删掉 pillow
验证码只剩注册一处调用方,一并去掉。
- UserRegisterAPI 的校验、UserRegisterSerializer 的 captcha 字段、
发图的 captcha 路由
- utils/captcha/ 整个包删除,含 Menlo.ttc 和 timesbi.ttf 两个字体
- utils/shortcuts.py 的 img2base64(),唯一调用方是验证码视图
- 依赖删除 pillow(本地实测 PIL/ 5.9M + pillow.libs/ 14M)
注意:注册接口现在只有 SysOptions.allow_register 一个开关,没有限流,
throttling 目前只用在 SubmissionAPI 上。内网自用可以接受,站点若暴露到
公网需要补 IP 维度限流。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
2026-08-05 23:48:00 -06:00 |
|
|
|
927f235537
|
refactor: 移除邮件功能
发信能力整体下线,唯一的调用方(忘记密码)前端也从来没接过。
- utils/shortcuts.py 删 send_email,连带四个 django.core.mail 相关 import
- account/tasks.py 整个删除,里面只有 send_email_async 一个 actor
- 删 ApplyResetPasswordAPI / ResetPasswordAPI 及其路由、serializer,
User.reset_password_token 和 reset_password_token_expire_time 两个
字段(account/0010)
- 删 SMTPAPI / SMTPTestAPI 及其路由、三个 SMTP serializer、
SysOptions.smtp_config
- account/templates/reset_password_email.html
options/0003 数据迁移删掉库里的 smtp_config 行:_init_option 会为每个
OptionKey 建行,key 从代码里去掉后它会变成孤儿,而且配过 SMTP 的话
value 里存着明文密码。
保留 ResetUserPasswordAPI(管理端直接重置密码,不发信,前端在用)和
User.email(注册要填)。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
2026-08-05 23:17:48 -06:00 |
|
|
|
989b33d827
|
refactor: 移除 2FA 功能与三个冗余依赖
2FA 早已是死代码:TOTP 相关端点标注为前端未调用,前端唯一的
two_factor_auth 是硬编码 false,没有任何入口能打开它。
- 删除 TwoFactorAuthAPI、CheckTFARequiredAPI、_totp* 辅助函数、
TwoFactorAuthCodeSerializer 及各 serializer 的 tfa_code 字段
- 删除管理端写 two_factor_auth/tfa_token 的分支。登录已不再校验
TOTP,若保留写入路径,置 True 会变成静默的安全降级
- 删除 User.two_factor_auth / tfa_token 字段(迁移 0009)
- 移除 django-dbconn-retry:仅挂在 INSTALLED_APPS,代码零引用。
DATABASES 未配置 CONN_MAX_AGE(默认 0),本就没有持久连接需要
重连修复。要开持久连接用 Django 自带的 CONN_HEALTH_CHECKS
- requests 换成 httpx(openai 已经引入):删除废弃的
ReleaseNotesAPI,judge dispatcher 显式传 timeout=None 以保持
requests 原本的无超时行为,判题请求是同步等结果的
依赖净减 5 个:otpauth、qrcode、requests、charset-normalizer、
django-dbconn-retry
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
2026-08-05 23:00:45 -06:00 |
|
|
|
57c0572fd9
|
async
|
2026-05-26 21:25:26 -06:00 |
|
|
|
028ea6e5f9
|
fmt
|
2026-04-23 13:57:56 -06:00 |
|
|
|
24f1a0372e
|
提交题目完成的排名
|
2025-09-21 19:11:18 +08:00 |
|
|
|
911c777348
|
reset password
|
2025-08-30 14:29:16 +08:00 |
|
|
|
4fafdd278e
|
用户调查
|
2025-04-13 19:09:01 +08:00 |
|
|
|
47cf28eb67
|
添加最近提交
|
2025-04-13 16:48:40 +08:00 |
|
yuetsh
|
749612002a
|
新增活跃度排名
|
2024-08-14 00:24:46 +08:00 |
|
yuetsh
|
c497d511dc
|
refactor
|
2024-07-01 12:17:43 +08:00 |
|
|
|
6cf7087339
|
update Django to v5
|
2024-06-05 17:40:45 +08:00 |
|
virusdefender
|
e843404c5f
|
sso api
|
2018-05-06 01:06:49 +08:00 |
|
virusdefender
|
00eb3b1967
|
add api to reset openapi appkey and related middleware
|
2017-11-25 22:31:04 +08:00 |
|
zema1
|
a87d73393d
|
补全account测试
|
2017-11-23 21:12:37 +08:00 |
|
zema1
|
e8b06f0487
|
add generate user api
|
2017-11-18 08:26:41 +08:00 |
|
zema1
|
343eff1c51
|
admin修改username后update submissions;
problem id refresh api
|
2017-11-08 21:56:39 +08:00 |
|
zema1
|
728373a5ff
|
完善contest权限控制
|
2017-10-27 18:36:29 +08:00 |
|
virusdefender
|
93bd77d8d8
|
bug fixes
|
2017-10-09 18:55:25 +08:00 |
|
virusdefender
|
a324d55364
|
tiny work
|
2017-10-02 05:16:14 +08:00 |
|
zema1
|
034ad59f2e
|
support avatar upload;
use middleware to operate session data.
|
2017-09-19 19:10:50 +08:00 |
|
zema1
|
1ee0596a3a
|
add session management api; add more unit tests for account module
|
2017-09-16 20:40:56 +08:00 |
|
zemal
|
07643e2639
|
ranklist相关的改动
|
2017-08-20 20:32:07 +08:00 |
|
zemal
|
3b1f02c356
|
整理代码
|
2017-08-20 08:35:59 +08:00 |
|
zemal
|
0647312124
|
add username or email check api
|
2017-08-19 17:25:39 +08:00 |
|
zemal
|
d1767e775d
|
完善captchaapi
|
2017-08-19 06:10:48 +08:00 |
|
zemal
|
14b850c652
|
完成ACM ContestProblem相关判题逻辑
contest,submission等表默认-create_time排序
|
2017-08-01 16:52:48 +08:00 |
|
zemal
|
17432b4c81
|
添加contest access api
|
2017-07-20 15:52:11 +08:00 |
|
zemal
|
b931724c9b
|
修改用户信息api
|
2017-07-04 10:26:02 +08:00 |
|
Chiaki
|
65f9c7f52b
|
Add submission module
|
2017-05-08 17:29:01 +08:00 |
|
Chiaki
|
d11f8f9bff
|
Fix python3 qrcode and some bugs
|
2017-05-01 15:20:13 +08:00 |
|
Chiaki
|
043f8c8b26
|
Change account interface
|
2017-04-30 21:58:34 +08:00 |
|
virusdefender
|
8128e076f2
|
format code
|
2017-04-19 01:37:10 +08:00 |
|
Chiaki
|
3caf2d9d2c
|
Allow multiple ways to access url and fix ci
|
2017-04-18 15:39:49 +08:00 |
|
Chiaki
|
1fcd13b5e1
|
Add avatar upload api
|
2017-04-18 15:35:08 +08:00 |
|
Chiaki
|
ee05af8e5a
|
Add sso and 2fa api
|
2017-04-18 15:19:26 +08:00 |
|
Chiaki
|
a9b25b872a
|
for pass ci...
|
2017-04-18 12:05:07 +08:00 |
|
Chiaki
|
e3692c2329
|
Add reset password api
|
2017-04-18 11:57:57 +08:00 |
|
Chiaki
|
8a68ad7ac9
|
add account view for preview
|
2017-04-16 10:15:26 +08:00 |
|
virusdefender
|
d9fad97e35
|
isort
|
2017-01-23 16:48:04 +08:00 |
|
virusdefender
|
32c1b89080
|
flake8
|
2017-01-23 16:25:14 +08:00 |
|
virusdefender
|
637baba71b
|
add conf app and related test and settings
|
2016-11-19 13:47:59 +08:00 |
|
virusdefender
|
7fcc4d972b
|
统一APIView的名字
|
2016-11-19 12:37:27 +08:00 |
|
virusdefender
|
172fd4b1f4
|
使用Python3和更科学的API写法
|
2016-11-19 12:32:23 +08:00 |
|
virusdefender
|
61ab910d53
|
重构
|
2016-09-25 14:07:45 +08:00 |
|