diff --git a/src/data/redis/captcha.js b/src/data/redis/captcha.js index 4677357a..9851edc6 100644 --- a/src/data/redis/captcha.js +++ b/src/data/redis/captcha.js @@ -109,7 +109,7 @@ export async function checkCaptchaSolution( if (!captchaid) { return 4; } - const solution = await client.get(`capt:${captchaid}`); + const solution = await client.getDel(`capt:${captchaid}`); if (solution) { if (evaluateResult(solution, text)) { if (Math.random() < 0.1) { @@ -122,7 +122,7 @@ export async function checkCaptchaSolution( EX: TTL_CACHE, }); } - logger.info(`CAPTCHA ${ip} successfully solved captcha`); + logger.info(`CAPTCHA ${ip} successfully solved captcha ${text}`); return 0; } logger.info(