Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.captchaValidate.reject(new AuthorizationError({
message: 'Incorrect captcha code',
code: FAILED_PASSED_CAPTCHA
}));
this.captchaValidate = null;
this.captchaAttempts += 1;
}
const { action, fields } = parseFormField($);
const src = $('.captcha_img').attr('src');
const { key, validate } = await this.vk.callbackService.processingCaptcha({
type: CaptchaType.ACCOUNT_VERIFICATION,
sid: fields.captcha_sid,
src
});
this.captchaValidate = validate;
fields.captcha_key = key;
const url = getFullURL(action, response);
url.searchParams.set('utf8', '1');
const pageResponse = await this.fetch(url, {
method: 'POST',
body: new URLSearchParams(fields)
});