Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Set the captcha error handling dangerously
  • Loading branch information
regalijan committed Mar 26, 2024
1 parent 00bbe61 commit 618c1af
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions app/routes/report.tsx
Expand Up @@ -359,25 +359,27 @@ export default function () {
</CircularProgress>
</HStack>
</Container>
<script>
{`
function onTurnstileError(code) {
<script
dangerouslySetInnerHTML={{
__html: `
function onTurnstileError(code) {
const messages = {
110500: 'Your browser is too old to complete the captcha, please update it.',
110510: 'Something unexpected happened, please try disabling all extensions and refresh the page. If this does not solve the problem, use a different browser.',
110600: 'Failed to solve the captcha, please refresh the page to try again.',
200010: 'Invalid cache, please clear your cache and site data in your browser's settings.',
200100: 'Your device's clock is wrong, please fix it.',
};
110500: 'Your browser is too old to complete the captcha, please update it.',
110510: 'Something unexpected happened, please try disabling all extensions and refresh the page. If this does not solve the problem, use a different browser.',
110600: 'Failed to solve the captcha, please refresh the page to try again.',
200010: 'Invalid cache, please clear your cache and site data in your browser's settings.',
200100: 'Your device's clock is wrong, please fix it.',
};
const message = messages[code];
const message = messages[code];
alert(message ?? \`Unknown error when solving captcha. Error \${code}\`);
alert(message ?? \`Unknown error when solving captcha. Error \${code}\`);
return true;
}
`}
</script>
return true;
}
`,
}}
></script>
</>
);
}

0 comments on commit 618c1af

Please sign in to comment.