Skip to content

Commit 4ce6f66

Browse files
authored
Revert to await but add timeout instead. (#377)
Reverts back to await, though if someone is smart they can get `timeout + 1.5` seconds of execution time.
1 parent 1df5334 commit 4ce6f66

File tree

1 file changed

+3
-1
lines changed
  • dist/challenge-templates/xss-bot/challenge

1 file changed

+3
-1
lines changed

dist/challenge-templates/xss-bot/challenge/bot.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ if (BLOCK_SUBORIGINS) {
5353
const page = await context.newPage();
5454
await page.setCookie(cookie);
5555
socket.write(`Loading page ${url}.\n`);
56-
page.goto(url);
56+
await page.goto(url, {
57+
timeout: 1500 /* add 1.5s margin for network delays */
58+
});
5759
setTimeout(()=>{
5860
try {
5961
context.close();

0 commit comments

Comments
 (0)