summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/SigninApiService.ts
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2024-10-11 21:05:53 +0900
committerGitHub <noreply@github.com>2024-10-11 21:05:53 +0900
commitaf1cbc131fc9e045692f9f9def708c0978817fff (patch)
tree84143fc3e0d9a889a6005ddb62e08298087c8acf /packages/backend/src/server/api/SigninApiService.ts
parentchore: add description (diff)
downloadsharkey-af1cbc131fc9e045692f9f9def708c0978817fff.tar.gz
sharkey-af1cbc131fc9e045692f9f9def708c0978817fff.tar.bz2
sharkey-af1cbc131fc9e045692f9f9def708c0978817fff.zip
wip (#14745)
Diffstat (limited to 'packages/backend/src/server/api/SigninApiService.ts')
-rw-r--r--packages/backend/src/server/api/SigninApiService.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/backend/src/server/api/SigninApiService.ts b/packages/backend/src/server/api/SigninApiService.ts
index 0d24ffa56a..1d983ca4bc 100644
--- a/packages/backend/src/server/api/SigninApiService.ts
+++ b/packages/backend/src/server/api/SigninApiService.ts
@@ -71,6 +71,7 @@ export class SigninApiService {
'g-recaptcha-response'?: string;
'turnstile-response'?: string;
'm-captcha-response'?: string;
+ 'testcaptcha-response'?: string;
};
}>,
reply: FastifyReply,
@@ -194,6 +195,12 @@ export class SigninApiService {
throw new FastifyReplyError(400, err);
});
}
+
+ if (this.meta.enableTestcaptcha) {
+ await this.captchaService.verifyTestcaptcha(body['testcaptcha-response']).catch(err => {
+ throw new FastifyReplyError(400, err);
+ });
+ }
}
if (same) {