Merge local main (1.17.2) into security-a-118
Conflicts resolved by keeping both sides: lockedAnswer + sign-in rules in plugin.ts and switches.ts, IPv6 grouping in the mail service's new per-visitor address count, both built-site specs in e2e:built, docs and skills (reference copies synced). The lockedAnswer suite and the sign-in-answers spec now reach Payload's lock the 1.18.0 way: a spray from 50 IPs, one failure each (one IP alone gets 429 after five). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -16,7 +16,9 @@
|
||||
* "consent" test (banner at first paint, Global Privacy Control, equal prominence, withdrawal, the consent log)
|
||||
* and e2e/sign-in-look.spec.ts (the sign-in panel in the first HTML, on a phone, the language links, the 2FA screen),
|
||||
* e2e/own-account.spec.ts (1.18.0: the account page asks for the current password; staff sign-in failures per place;
|
||||
* staff sign-in from another origin refused).
|
||||
* staff sign-in from another origin refused);
|
||||
* e2e/sign-in-answers.spec.ts (1.17.2: a locked staff account answers like a wrong password; the panel actions refuse
|
||||
* another origin).
|
||||
*
|
||||
* Needs what the reference site's "Production check" needs (reference/README.md): reference/.env with a local,
|
||||
* seeded database and the E2E_* test admin. The test admins are reset by Playwright's global setup.
|
||||
@@ -26,6 +28,7 @@
|
||||
* Options: --only=webpack | --only=turbopack; --skip-plugin-build (dist and the injected copy are current).
|
||||
*/
|
||||
import { spawnSync } from 'node:child_process'
|
||||
import { randomBytes } from 'node:crypto'
|
||||
import { existsSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
@@ -75,6 +78,8 @@ const restore = () => {
|
||||
process.on('exit', restore)
|
||||
for (const signal of ['SIGINT', 'SIGTERM']) {process.on(signal, () => process.exit(130))}
|
||||
|
||||
// the fixture's job queue is run by the closed-doors spec with this secret (a fresh one per run)
|
||||
const cronSecret = randomBytes(24).toString('base64url')
|
||||
const fixture = { E2E_LATE_STAFF: '1', NODE_OPTIONS: `${process.env.NODE_OPTIONS ?? ''} --max-old-space-size=3072`.trim() }
|
||||
const passed = []
|
||||
for (const bundler of bundlers) {
|
||||
@@ -91,7 +96,7 @@ for (const bundler of bundlers) {
|
||||
process.exit(1)
|
||||
}
|
||||
console.log(`[e2e:built] ✓ ${bundler}: no package manifest among ${files.length} public files`)
|
||||
run(`${bundler}: the built site — late-staff spec, the mail service, closed doors, the published-files check, the client hints, consent and the sign-in look`, 'pnpm', ['exec', 'playwright', 'test', 'late-staff', 'mail-relay', 'closed-doors', 'smoke', 'sign-in-look', 'own-account', '--grep', 'late staff collection|the mail service|closed doors|no package.json is published|client hints|consent|sign-in look|own account|staff sign-in'], site, { ALLOW_LOCAL_MEDIA: process.env.ALLOW_LOCAL_MEDIA ?? '1', E2E_LATE_STAFF: '1' })
|
||||
run(`${bundler}: the built site — late-staff spec, the mail service, closed doors, the published-files check, the client hints, consent, the sign-in look, the sign-in answers and the own account`, 'pnpm', ['exec', 'playwright', 'test', 'late-staff', 'mail-relay', 'closed-doors', 'smoke', 'sign-in-look', 'sign-in-answers', 'own-account', '--grep', 'late staff collection|the mail service|closed doors|no package.json is published|client hints|consent|sign-in look|locked staff account|panel actions|own account|staff sign-in'], site, { ALLOW_LOCAL_MEDIA: process.env.ALLOW_LOCAL_MEDIA ?? '1', CRON_SECRET: cronSecret, E2E_LATE_STAFF: '1' })
|
||||
passed.push(bundler)
|
||||
}
|
||||
console.log(`\n[e2e:built] passed: ${passed.join(' and ')}. (The reference site's .next now holds the ${passed.at(-1)} build WITH the fixture: rebuild with \`pnpm build\` there before other checks.)`)
|
||||
|
||||
Reference in New Issue
Block a user