Harden auth/vault path sanitization and clean WeKnora docs
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
"use strict";
|
||||
|
||||
const { loginViaAuthForm } = require('./lib/browser-auth-login');
|
||||
const assert = require("node:assert");
|
||||
const fs = require("node:fs");
|
||||
const os = require("node:os");
|
||||
@@ -43,9 +44,7 @@ async function saveScreenshot(page, name) {
|
||||
async function loginTestAccount(page) {
|
||||
await page.goto(`${BASE_URL}/auth`, { waitUntil: "domcontentloaded", timeout: UI_TIMEOUT_MS });
|
||||
if (page.url().includes("/auth")) {
|
||||
const quickLogin = page.locator('[data-auth-test-login]').first();
|
||||
await quickLogin.waitFor({ state: "visible", timeout: UI_TIMEOUT_MS });
|
||||
await quickLogin.click({ timeout: UI_TIMEOUT_MS });
|
||||
await loginViaAuthForm(page, { timeoutMs: typeof UI_TIMEOUT_MS !== 'undefined' ? UI_TIMEOUT_MS : undefined });
|
||||
await page.waitForURL((url) => !url.toString().includes("/auth"), {
|
||||
waitUntil: "commit",
|
||||
timeout: UI_TIMEOUT_MS,
|
||||
|
||||
Reference in New Issue
Block a user