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 { spawn } = require("node:child_process");
|
||||
const {
|
||||
@@ -72,7 +73,10 @@ async function validateAuthEntry(baseUrl) {
|
||||
assert.match(authText, /name="password"[^>]*type="password"|type="password"[^>]*name="password"/);
|
||||
assert.match(authText, /data-auth-mode="control-plane-session"/);
|
||||
assert.match(authText, /没有账号?注册/);
|
||||
assert.match(authText, /测试账号快速登录/);
|
||||
assert.doesNotMatch(authText, /测试账号快速登录/);
|
||||
assert.doesNotMatch(authText, /data-auth-test-login/);
|
||||
assert.doesNotMatch(authText, /data-test-password/);
|
||||
assert.match(authText, /data-auth-submit/);
|
||||
assert.doesNotMatch(authText, /隐私政策|使用\s*Google|使用\s*GitHub|第三方快捷/iu);
|
||||
|
||||
const authedAuth = await fetchWithTimeout(`${baseUrl}/auth`, {
|
||||
|
||||
Reference in New Issue
Block a user