Skip to content

Commit

Permalink
Revert to await but add timeout instead. (#377)
Browse files Browse the repository at this point in the history
Reverts back to await, though if someone is smart they can get `timeout + 1.5` seconds of execution time.
  • Loading branch information
terjanq authored Jun 17, 2022
1 parent 1df5334 commit 4ce6f66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dist/challenge-templates/xss-bot/challenge/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ if (BLOCK_SUBORIGINS) {
const page = await context.newPage();
await page.setCookie(cookie);
socket.write(`Loading page ${url}.\n`);
page.goto(url);
await page.goto(url, {
timeout: 1500 /* add 1.5s margin for network delays */
});
setTimeout(()=>{
try {
context.close();
Expand Down

0 comments on commit 4ce6f66

Please sign in to comment.