1.18.0 upgrade notes
PROGRAMISTA §6 rows 83–87 now 1.18.0 (1.17.2 was never released alone) and new rows 88–94; iapl-upgrade blocks for speed and growth and for drafts in related documents, the 1.17.2 blocks as "→ 1.18.0 (from 1.17.2)"; every "since 1.17.2" in docs, comments and tests reads 1.18.0; reference skills, AGENTS.md and the reference index on 1.18.0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
af98cfba96
commit
9b83cc600a
@@ -46,14 +46,14 @@ const DOORS: Door[] = [
|
||||
{ closedFor: ALL, method: 'POST', name: 'the crawler\'s call-back without its token', path: '/api/ipal/cookie-crawl/results', body: { jobId: 'x', ok: true } },
|
||||
{ closedFor: OUTSIDERS, method: 'POST', name: 'a crawl without the schedule\'s token', path: '/api/ipal/cookie-crawl' },
|
||||
{ closedFor: OUTSIDERS, name: 'form submissions', path: '/api/form-submissions' },
|
||||
// IAPL 1.17.2: a staff account only; an open door answers 400 (validation) instead of 403
|
||||
// IAPL 1.18.0: a staff account only; an open door answers 400 (validation) instead of 403
|
||||
{ body: { form: NO_ID, submissionData: [] }, closedFor: OUTSIDERS, method: 'POST', name: 'a submission past submitForm', path: '/api/form-submissions', closed: status(403) },
|
||||
{ body: { email: '[email protected]', password: 'Door-Password-1234', roles: ['admin'] }, closedFor: ALL, method: 'POST', name: 'nobody creates a staff account', path: '/api/users', closed: status(403) },
|
||||
{ body: { email: '[email protected]', password: 'Door-Password-1234' }, closedFor: ALL, method: 'POST', name: 'the first-user route once an account exists', path: '/api/users/first-register', closed: status(403) },
|
||||
{ body: {}, closedFor: OUTSIDERS, method: 'POST', name: 'Site settings cannot be saved', path: '/api/globals/site-settings', closed: status(403) },
|
||||
{ closedFor: ALL, name: 'the GraphQL playground (production)', path: '/api/graphql-playground', closed: status(404) },
|
||||
{ closedFor: ALL, graphql: '{ __schema { queryType { name } } }', closed: ({ body }) => Boolean((body as { errors?: unknown[] })?.errors?.length), name: 'GraphQL introspection (production)' },
|
||||
// a site without jobs: 404. A site WITH jobs (IAPL 1.17.2): refused (401) for everybody but an admin and
|
||||
// a site without jobs: 404. A site WITH jobs (IAPL 1.18.0): refused (401) for everybody but an admin and
|
||||
// `Authorization: Bearer <CRON_SECRET>` — drop `closed: status(404)` there
|
||||
{ closedFor: ALL, name: 'Payload\'s job queue', path: '/api/payload-jobs/run', closed: status(404) },
|
||||
// the project's own doors: add them here
|
||||
|
||||
@@ -55,7 +55,7 @@ before analytics or marketing consent — check the project's choice in "Project
|
||||
`nonce` to `<SiteProviders>`. A visitor who decided must never see the banner on reload; one whose
|
||||
decision is from an older Policy version must see it at once. A click on a button before hydration
|
||||
counts (the checks above click as soon as the button is visible).
|
||||
7. Cookie button (1.17.2, consent.md → "Where the cookie button sits"): after a decision, on a long page, a short
|
||||
7. Cookie button (1.18.0, consent.md → "Where the cookie button sits"): after a decision, on a long page, a short
|
||||
page and a page with a form, desktop and phone width (also 360 px) — the button is in the bottom corner of the
|
||||
window at the top, in the middle, with the footer in view and at the very end: it must not move at all. At the
|
||||
very end nothing of the footer is under it and the last footer link can be tapped (the footer has grown a little:
|
||||
|
||||
@@ -34,8 +34,8 @@ through this procedure. Ask only when you are missing something you cannot get y
|
||||
### Build / TypeScript
|
||||
| Symptom | Cause | Fix |
|
||||
|---|---|---|
|
||||
| a panel button (mail service Connect / Disconnect, Send test e-mail, cookie scan / approve / check site) answers `403` "Not allowed from this origin."; log `[iapl] a panel action from origin "…" was refused` | the request's origin is not one the site knows (1.17.2, `adminSameOrigin`): a reverse proxy that rewrites `Host` and sends no `X-Forwarded-Host`, and no `serverURL` | set `serverURL: process.env.NEXT_PUBLIC_SERVER_URL` in the Payload config, or make the proxy send `X-Forwarded-Host`, or `adminSameOrigin: { origins: ['https://…'] }`; `iapl-doctor` `csrf-empty` |
|
||||
| a staff account's correct password gets "The email or password provided is incorrect." | the account is locked by Payload after `maxLoginAttempts` wrong passwords (5, for `lockTime`, 10 min); since 1.17.2 a locked staff account gets the wrong-password answer (`accounts.lockedAnswer`) | wait for the lock to end, or an admin unlocks it (the account in the panel, or `POST /api/users/unlock`); `lockUntil` on the account shows it. Payload's own message back: `accounts: { lockedAnswer: 'payload' }` |
|
||||
| a panel button (mail service Connect / Disconnect, Send test e-mail, cookie scan / approve / check site) answers `403` "Not allowed from this origin."; log `[iapl] a panel action from origin "…" was refused` | the request's origin is not one the site knows (1.18.0, `adminSameOrigin`): a reverse proxy that rewrites `Host` and sends no `X-Forwarded-Host`, and no `serverURL` | set `serverURL: process.env.NEXT_PUBLIC_SERVER_URL` in the Payload config, or make the proxy send `X-Forwarded-Host`, or `adminSameOrigin: { origins: ['https://…'] }`; `iapl-doctor` `csrf-empty` |
|
||||
| a staff account's correct password gets "The email or password provided is incorrect." | the account is locked by Payload after `maxLoginAttempts` wrong passwords (5, for `lockTime`, 10 min); since 1.18.0 a locked staff account gets the wrong-password answer (`accounts.lockedAnswer`) | wait for the lock to end, or an admin unlocks it (the account in the panel, or `POST /api/users/unlock`); `lockUntil` on the account shows it. Payload's own message back: `accounts: { lockedAnswer: 'payload' }` |
|
||||
| a sign-in answers `429` "Too many failed sign-ins to this address from here" | 5 failed sign-ins for that address from that client IP in 15 minutes (`accounts.signInLimit`, 1.18.0); everybody behind one IP shares it (an office NAT); without `IAPL_IP_HEADER` everybody may share the no-IP bucket | wait the minutes it names, or sign in from elsewhere; pin `IAPL_IP_HEADER`; more room: `signInLimit: { perAddress: 10 }` |
|
||||
| staff login / "forgot password" answers `403` and the log says `[iapl] a staff sign-in from origin "…" was refused` | the request came from another origin (`accounts.signInSameOrigin`, 1.18.0): a front end on another domain, or a proxy that rewrites `Host` without `serverURL` | set `serverURL`, or `signInSameOrigin: { origins: ['https://…'] }` |
|
||||
| saving one's own account answers "Enter your current password to change your e-mail address or password." | `accounts.confirmOwnChanges` (1.18.0): own e-mail / username / password changes need the current password | type it in "Current password" on the account page; scripts send `currentPassword`; off: `confirmOwnChanges: false` |
|
||||
|
||||
@@ -38,7 +38,7 @@ description: Complete map of everything @intecion/ipal-kit provides — every ia
|
||||
| `accounts.staffOnlyRead` | on | `read` and `readVersions` on a staff collection without those rules: a fully signed-in account of a staff collection (Payload's default let a visitor account list the staff accounts) | `false` = Payload's default; a `read` rule you wrote wins |
|
||||
| `accounts.firstUserRoute` | `'panel'` | which auth collections `POST /api/<slug>/first-register` answers for while they are empty: only the one the panel logs in with (the first account of a site → admin). Others get `403`, a second staff collection included, in any spelling of the URL (the plugin's own endpoint sits in front of Payload's); a collection whose own `create` allows an anonymous request keeps its route. With `access.firstUserAdmin: false` and a default role below the panel role, the default `panelRole` is not applied (logged) and an explicit one is refused at start | a list of slugs; `'all'` = Payload's behaviour |
|
||||
| `accounts.password` | `{ minLength: 12 }` | when a password is SET on a staff collection (create, first-user screen, change, reset by e-mail; panel, API and Local API): at least `minLength` characters, not the account's e-mail address. Existing passwords are never checked — a shorter one keeps logging in | `{ minLength }`; `false` = Payload's rule (3 characters) |
|
||||
| `accounts.lockedAnswer` | `'wrong'` (1.17.2) | a staff account Payload has locked (too many wrong passwords) gets exactly the wrong-password answer on login (REST, GraphQL, the panel): nobody tells which addresses have an account; the lock itself is unchanged | `'payload'` = Payload's "This user is locked…"; any other value stops the start |
|
||||
| `accounts.lockedAnswer` | `'wrong'` (1.18.0) | a staff account Payload has locked (too many wrong passwords) gets exactly the wrong-password answer on login (REST, GraphQL, the panel): nobody tells which addresses have an account; the lock itself is unchanged | `'payload'` = Payload's "This user is locked…"; any other value stops the start |
|
||||
| `accounts.signInLimit` | `{ perAddress: 5, windowMinutes: 15, accountLock: { maxLoginAttempts: 50, lockTime: 3_600_000 } }` (1.18.0) | failed staff sign-ins per client IP + typed address (folded): over the limit `429` for that IP and address only; only failures count; Payload's per-account lock raised where the project set none | `{ perAddress, windowMinutes, accountLock }`; `accountLock: false` = Payload's lock; `false` = as before 1.18 |
|
||||
| `accounts.signInSameOrigin` | on (1.18.0) | staff login / forgot / reset password: `403` for a request a browser marks as coming from another origin | `{ origins: [...] }`; `false` |
|
||||
| `accounts.confirmOwnChanges` | on (1.18.0) | own e-mail / username / password change needs `currentPassword` (panel field, REST, GraphQL) | `false` |
|
||||
@@ -50,7 +50,7 @@ description: Complete map of everything @intecion/ipal-kit provides — every ia
|
||||
| `listLimit` | `{ max: 100, staff: false }` (1.18.0, audit F4) | a REST / GraphQL list (`find`, versions, distinct) from a caller that is not staff gets at most `max` documents; `pagination=false` / `limit=0` become one page; staff, the Local API and server reads with `overrideAccess: true` that pass a request on untouched | `false` (Payload's behaviour); `{ max, staff: true, exclude: ['slug'] }`; `buildQueryGuardHook` for a collection added after iapl |
|
||||
| `refuseOperatorSort` | `true` (1.18.0, audit F5) | a `sort` naming a database operator (`$where`, `-$natural`, `a.$ne`) → `400` for everyone, logged as one `info` line (`RefusedSortError`) | `false`; `loggingLevels: { RefusedSortError: false }` hides the log line |
|
||||
| `lockedDocuments` | staff only (1.18.0) | Payload's document locks (`payload-locked-documents`) for staff accounts with the second factor; Payload's default was any signed-in account | `false` (Payload's default); `{ access: { read, create, update, delete } }` |
|
||||
| `adminSameOrigin` | on (1.17.2) | `POST` mail service connect / disconnect, test e-mail, cookie scan / approval / crawl refuse (`403`) a request a browser marks as coming from another origin; own origins: the request's host, `serverURL`, `csrf`, `cors`, `origins` | `{ origins: [...] }` adds origins; `false` = no check; any other value stops the start |
|
||||
| `adminSameOrigin` | on (1.18.0) | `POST` mail service connect / disconnect, test e-mail, cookie scan / approval / crawl refuse (`403`) a request a browser marks as coming from another origin; own origins: the request's host, `serverURL`, `csrf`, `cors`, `origins` | `{ origins: [...] }` adds origins; `false` = no check; any other value stops the start |
|
||||
| `adminRoute` | `'/admin'` | `config.routes.admin`; stats link and views, `IntegrationAlerts` | the project moves `app/(payload)/<route>/` itself and adds the route to the proxy matcher (security.md) |
|
||||
| `twoFactor` | **none = error** | `@clocklimited/payload-2fa` with `forceSetup: true` (TOTP enforced, also checked in the API) | `twoFactor: false` (discouraged); omitting the option throws `[iapl] twoFactor.issuer is required` |
|
||||
| `twoFactor.issuer` | — (required) | name in the authenticator app | — |
|
||||
@@ -102,7 +102,7 @@ description: Complete map of everything @intecion/ipal-kit provides — every ia
|
||||
| `forms.adminGroup` | `'Forms'` | sidebar group | `false` = Payload default; `admin.group` in overrides wins |
|
||||
| `forms.fields.*` | on: `checkbox`, `checkboxGroup`, `country`, `date`, `email`, `message`, `number`, `radio`, `select`, `state`, `step`, `text`, `textarea`, `time`; off: `payment` | block types in the builder (all with "Show only when") | `<type>: false`; a block object replaces it; `payment: true` **does nothing** (filtered out) — pass a block object |
|
||||
| `forms.formOverrides` | Form/Forms labels, `emails` readable by logged-in users only | overrides the `forms` collection (`fields: ({ defaultFields }) => …`, `slug`, `admin`, `access`…) | any `CollectionConfig` |
|
||||
| `forms.formSubmissionOverrides` | create: a staff account with its second factor (since 1.17.2; before: any signed-in account), read: editor+, delete: admin | overrides `form-submissions` | `access.create` etc. wins |
|
||||
| `forms.formSubmissionOverrides` | create: a staff account with its second factor (since 1.18.0; before: any signed-in account), read: editor+, delete: admin | overrides `form-submissions` | `access.create` etc. wins |
|
||||
| `forms.redirectRelationships` | none | collections a form can redirect to | `['pages']` |
|
||||
| `forms.emailLayout` | `false` | `beforeEmail` with a layout (logo, colour, footer) + Site settings → **Emails** tab; `{{*:table}}` readable | `true` |
|
||||
| `forms.beforeEmail` | none | your own e-mail changes (after the layout) | form-builder function |
|
||||
@@ -112,7 +112,7 @@ description: Complete map of everything @intecion/ipal-kit provides — every ia
|
||||
| `consentLog` | **on** (since 1.17.0) | `consent-records` collection + `POST /api/ipal/consent` (rate limit 20/min); Postgres / SQLite: a table, migration in the same deploy; MongoDB: a TTL index deletes records older than the retention (1.18.0) | `false` / `{ retentionDays }` (default 1095) / `{ ttlIndex: false }` |
|
||||
| `unusedMedia` | off | 1.18.0: a notice above upload lists with a link to the files nothing uses (manual delete); then `pnpm generate:importmap` | `true` / `{ collections: ['media'] }` |
|
||||
| `consentLog.collectionOverrides` | none | changes `consent-records`: an object merges `access` / `admin` / `hooks` key by key (your keys win), a function `(collection) => collection` takes over (keep the slug) | e.g. `{ access: { read: ({ req }) => req.user?.email === '[email protected]' } }` — narrows who reads records in a project without roles |
|
||||
| `jobsRunAccess` | on (since 1.17.2), only when the project writes no `jobs.access.run` | Payload's job queue over HTTP (`/api/payload-jobs/run`, `/handle-schedules`): an admin with the second factor (an admin API key counts) or `Authorization: Bearer <CRON_SECRET>` (16+ chars); before: any signed-in account of any auth collection. In-process runs (`jobs.autoRun`, `payload jobs:run`) unaffected | `false` = Payload's default; `{ secretVar }` = another variable; your own `jobs.access.run` wins. Check: `curl -H "Authorization: Bearer $CRON_SECRET" $URL/api/payload-jobs/run` → 200, without it 401 (security.md "Payload's job queue") |
|
||||
| `jobsRunAccess` | on (since 1.18.0), only when the project writes no `jobs.access.run` | Payload's job queue over HTTP (`/api/payload-jobs/run`, `/handle-schedules`): an admin with the second factor (an admin API key counts) or `Authorization: Bearer <CRON_SECRET>` (16+ chars); before: any signed-in account of any auth collection. In-process runs (`jobs.autoRun`, `payload jobs:run`) unaffected | `false` = Payload's default; `{ secretVar }` = another variable; your own `jobs.access.run` wins. Check: `curl -H "Authorization: Bearer $CRON_SECRET" $URL/api/payload-jobs/run` → 200, without it 401 (security.md "Payload's job queue") |
|
||||
| `doctor` | on (404 until `IAPL_DOCTOR_TOKEN` is set) | `GET /api/ipal/doctor` — read-only counts for `iapl-doctor --url` (users without TOTP, cookies waiting for approval, versions); Bearer token ≥ 32 characters, rate-limited, never names or values | `false` = no endpoint; `{ tokenVar, access }` (doctor.md) |
|
||||
| `cookieScanner` | off | `cookie-review` collection, "Scan cookies" box above its list (`CookieScanButton`), `GET`/`POST /api/ipal/cookie-scan`, and (unless `approval: false`) the *Approve cookies* view `/admin/cookie-approval` (`CookieApprovalView`) + `GET`/`POST /api/ipal/cookie-approval` + the dashboard reminder; a scan lists the cookies of the integrations switched on + names looked up in the bundled Open Cookie Database; one **Approve and add** puts the ticked cookies into Cookies → Cookie list (so `<CookieTable>` and the detailed window); never deletes, never overwrites edited text, never duplicates, nothing reaches the banner before approval | `true` / object; after switching on: `pnpm generate:importmap` + `migrate:create`. Check: *Privacy → Cookie review* → **Scan cookies** → "Waiting for approval: N" → **Review and approve** → **Approve and add** → the cookies are in Cookies → Cookie list (cookie-scanner.md) |
|
||||
| `cookieScanner.adminLayout` | `'combined'` | one *Cookies* entry: *Review and approve* and (with `crawl`) *Site check* tabs on the `cookie-settings` global (`ui` fields, `CookieReviewTab` / `CookieSiteCheckTab`); `cookie-review` and `cookie-crawl` get `admin.group: false` (out of the nav, pages and API kept) | `'separate'`; no migration, `generate:importmap` |
|
||||
|
||||
@@ -85,8 +85,8 @@ Admin panel components from `@intecion/ipal-kit/admin` — the project does NOT
|
||||
| `buildRolesField(defaultRole?, { firstUserAdmin? })` | `@intecion/ipal-kit` | The `roles` select field the plugin injects (only admins set roles; `firstUserAdmin` default `true` = the account made on "Create first user" gets `admin`). The plugin wires it itself — use it only for an auth collection the plugin does not manage. |
|
||||
| `injectRoles(config, accessOption)` | `@intecion/ipal-kit` | Adds `roles` to `accessOption.authCollection` in a config. The plugin calls it itself with `access` — do not call. |
|
||||
|
||||
| `requireOwnOrigin(endpoint, origins?)`, `guardAdminEndpoints(config, projectEndpoints, option)`, `ADMIN_POST_ENDPOINTS`, type `AdminSameOriginOption` | `@intecion/ipal-kit` | `adminSameOrigin` (1.17.2): wraps an endpoint so a request a browser marks as coming from another origin gets `403` (logged once per origin); applies it to the plugin's panel actions it added; the list of `[method, path]` covered. `reportRefusedOrigin(req, origins?, { what, option, docs }?)` names your option in the log line. |
|
||||
| `lockedLooksWrong`, `withLockedAnswer(config)`, `graphqlLoginName(collection)` | `@intecion/ipal-kit` | `accounts.lockedAnswer` (1.17.2): the config-level `afterError` hook that answers Payload's `LockedAuth` on a staff collection's login (REST, GraphQL) exactly like `AuthenticationError`; adding it to a config (idempotent); the GraphQL login mutation's name of a collection. |
|
||||
| `requireOwnOrigin(endpoint, origins?)`, `guardAdminEndpoints(config, projectEndpoints, option)`, `ADMIN_POST_ENDPOINTS`, type `AdminSameOriginOption` | `@intecion/ipal-kit` | `adminSameOrigin` (1.18.0): wraps an endpoint so a request a browser marks as coming from another origin gets `403` (logged once per origin); applies it to the plugin's panel actions it added; the list of `[method, path]` covered. `reportRefusedOrigin(req, origins?, { what, option, docs }?)` names your option in the log line. |
|
||||
| `lockedLooksWrong`, `withLockedAnswer(config)`, `graphqlLoginName(collection)` | `@intecion/ipal-kit` | `accounts.lockedAnswer` (1.18.0): the config-level `afterError` hook that answers Payload's `LockedAuth` on a staff collection's login (REST, GraphQL) exactly like `AuthenticationError`; adding it to a config (idempotent); the GraphQL login mutation's name of a collection. |
|
||||
| `applySignInRules(collection, accounts?)`, `buildSignInBeforeOperation(slug, rules)`, `releaseSignInPlace`, `settleFailedSignIn`, `buildCurrentPasswordField()`, `resolveSignInRules(accounts?)`, `foldSignInName(value)`, `passwordMatches({ hash, salt }, password)`, `CURRENT_PASSWORD_FIELD`, `SIGN_IN_RULES_MARK` (the mark on the `beforeOperation` hook); types `SignInRulesOptions`, `SignInLimitOptions`, `SignInSameOriginOptions` | `@intecion/ipal-kit` | 1.18.0, `accounts.signInLimit` / `signInSameOrigin` / `confirmOwnChanges`: the three rules on one staff collection (hooks, field, Payload lock defaults); the `beforeOperation` hook; the `afterLogin` hook that gives a sign-in's place back; the config `afterError` hook that ends a failed one; the virtual "Current password" field; the options with defaults; the address folding (NFKC, lower case, trim); Payload's stored-hash check (unknown formats refused). |
|
||||
| `releaseRateLimit({ key, scope, max?, windowMs?, cost? })` | `@intecion/ipal-kit` | Gives back a place `consumeRateLimit` took (memory: never below 0; a store: `hit(id, -cost)`) — for a limiter that counts failures only. |
|
||||
|
||||
@@ -170,8 +170,8 @@ Fifteen ready blocks and ten page templates. **Use a library block (or a variant
|
||||
|---|---|---|
|
||||
| `ConsentProvider` | `@intecion/ipal-kit/client` | Consent provider: `{ texts, cookieMap?, logEndpoint?, nonce?, cookieValue?, gpc?, maxAgeDays? }` (`gpc`: Global Privacy Control `'honour'` default / `'ask'` / `false`; `maxAgeDays`: re-ask period, default 180; withdrawal also removes the panel's listed storage keys and tells Meta / TikTok / Clarity) (`nonce`: CSP nonce for the banner's first-paint script; `cookieValue`: optional server-read consent cookie → exact HTML, dynamic pages) — consent state, cookie, Consent Mode, deleting cookies after consent is withdrawn, optional POST of the decision to the log (`'/api/ipal/consent'`). Wrap the layout once; required by the banner, `Analytics`, `ConsentScript`. |
|
||||
| `CookieBanner` | `@intecion/ipal-kit/client` | Consent banner + category settings: `settings: 'inline' \| 'modal' \| 'detailed'`, `controls`, `equalChoice` (recommended `true`), `order`, `settingsActions`, `icon`, `classNames`, `firstPaint` (default `true`: in the server HTML, decided before the first paint by an inline script; pages stay static), `nonce`; colours from `--ipal-*` CSS vars. Do not write your own banner. |
|
||||
| `CookieButton` | `@intecion/ipal-kit/client` | Floating button that reopens the cookie settings (withdrawing consent); hidden while the banner is visible. Fixed in the bottom corner of the window on every page and never moves (1.17.2: it no longer climbs above the footer). While it is shown the footer gets just enough bottom padding for its last row to end above the button (measured; the footer's own padding counts; nothing where the corner is empty; made before the first paint for a returning visitor). Props `className`, `side` (`'left' \| 'right'`), `reserve` (selector of the block that gets the room, default `COOKIE_BUTTON_RESERVE` = footer; `false` = none), `avoid` (placement before 1.17.2: selector it lifts above — `COOKIE_BUTTON_AVOID`). Amount by hand: `--ipal-cookie-button-space` on the footer (`0` = none). Tokens `--ipal-cookie-button-offset`, `--ipal-cookie-button-inset`. Type `CookieButtonProps`. |
|
||||
| `COOKIE_BUTTON_AVOID`, `bottomOverlap(tops, viewportHeight)` | `@intecion/ipal-kit/client` | Footer selector for the placement before 1.17.2 (`<CookieButton avoid={COOKIE_BUTTON_AVOID} />`); pixels the footer covers at the bottom of the screen (how far the button moves up then) |
|
||||
| `CookieButton` | `@intecion/ipal-kit/client` | Floating button that reopens the cookie settings (withdrawing consent); hidden while the banner is visible. Fixed in the bottom corner of the window on every page and never moves (1.18.0: it no longer climbs above the footer). While it is shown the footer gets just enough bottom padding for its last row to end above the button (measured; the footer's own padding counts; nothing where the corner is empty; made before the first paint for a returning visitor). Props `className`, `side` (`'left' \| 'right'`), `reserve` (selector of the block that gets the room, default `COOKIE_BUTTON_RESERVE` = footer; `false` = none), `avoid` (placement before 1.18.0: selector it lifts above — `COOKIE_BUTTON_AVOID`). Amount by hand: `--ipal-cookie-button-space` on the footer (`0` = none). Tokens `--ipal-cookie-button-offset`, `--ipal-cookie-button-inset`. Type `CookieButtonProps`. |
|
||||
| `COOKIE_BUTTON_AVOID`, `bottomOverlap(tops, viewportHeight)` | `@intecion/ipal-kit/client` | Footer selector for the placement before 1.18.0 (`<CookieButton avoid={COOKIE_BUTTON_AVOID} />`); pixels the footer covers at the bottom of the screen (how far the button moves up then) |
|
||||
| `COOKIE_BUTTON_RESERVE`, `COOKIE_BUTTON_SPACE_ATTRIBUTE`, `reserveCookieButtonSpace(options)` | `@intecion/ipal-kit/client` | Default selector of the block that gets room for the cookie button (the footer); the attribute that marks it while the room is there; the function that measures and applies (or, with `release: true`, removes) it — options type `CookieButtonSpaceOptions` (`selector`, `side`, `button?`, `release?`, `sheet?`). For a button of your own |
|
||||
| `consentDecidedScript({ version?, gpc?, cookieName? })` | `@intecion/ipal-kit` | JavaScript statements for an inline script: leave `true` in `d` when the browser holds a current consent decision (as `readConsentRecord` decides). The shared start of the plugin's pre-paint scripts |
|
||||
| `TOTP_TEXTS`, `TOTP_VIEW_TITLE` | `@intecion/ipal-kit` | en/pl texts of the 2FA screens (`totpPlugin:*`, merged by `twoFactor`) and their tab title |
|
||||
@@ -763,7 +763,7 @@ Most routes and metadata are already ready in `createContentHelpers` (`generateP
|
||||
| `setRateLimitStore(store \| null)` | `@intecion/ipal-kit` | Shared store (e.g. Redis) for all plugin limiters (forms, consents, MCP…); `null` = process memory. Call once at startup when several instances run. |
|
||||
| `setUnknownIpFactor(n)` | `@intecion/ipal-kit` | Requests with no client IP share one `unknown-ip` bucket with `n` × the limit (every plugin limiter). Call once at startup; `0` = unlimited (only with a limiter in front, e.g. Cloudflare). |
|
||||
| `UNKNOWN_IP_FACTOR` | `@intecion/ipal-kit` | `20` — the default factor of the no-IP bucket. |
|
||||
| `setIpv6Grouping({ prefix?, wide?, wideFactor? })`, `ipRateKey(ip)`, type `Ipv6Grouping` | `@intecion/ipal-kit` | 1.17.2: how every plugin limiter counts IPv6 — default one client per /64 (`prefix: 64`), no wide counter; `wide: 48` adds a counter per /48 at `wideFactor` (10) × the limit; `prefix: 128` = per address. Out-of-range values throw. `ipRateKey`: an IPv4 as it is, `::ffff:a.b.c.d` as the IPv4, an IPv6 as its network (`2001:db8:1:2:0:0:0:0/64`), anything else unchanged. |
|
||||
| `setIpv6Grouping({ prefix?, wide?, wideFactor? })`, `ipRateKey(ip)`, type `Ipv6Grouping` | `@intecion/ipal-kit` | 1.18.0: how every plugin limiter counts IPv6 — default one client per /64 (`prefix: 64`), no wide counter; `wide: 48` adds a counter per /48 at `wideFactor` (10) × the limit; `prefix: 128` = per address. Out-of-range values throw. `ipRateKey`: an IPv4 as it is, `::ffff:a.b.c.d` as the IPv4, an IPv6 as its network (`2001:db8:1:2:0:0:0:0/64`), anything else unchanged. |
|
||||
|
||||
**Types:** `ClientIpOptions` — `clientIp` options; `RateLimitStore` — store contract (`hit(id, cost, windowMs)` → `{ count, resetAt }`).
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ the MANDATORY SET (GEO: llms-full, Markdown, MCP; R2; Turnstile through
|
||||
`getTurnstileConfig`…). Wire each one according to PROGRAMISTA §2 — it is part of the update,
|
||||
not an extra. Skip one only with a client decision in `AGENTS.md` (`iapl-audit-skip:`).
|
||||
|
||||
**→ 1.18.0, sign-in (CHANGELOG 1.18.0; access.md "A stranger cannot lock a staff account out", "Staff sign-in only
|
||||
**→ 1.18.0, sign-in (CHANGELOG 1.18.0 "Staff sign-in"; PROGRAMISTA §6, item 89; access.md "A stranger cannot lock a staff account out", "Staff sign-in only
|
||||
from the site's own origin", "Changing one's own e-mail or password asks for the current password") — no schema change,
|
||||
no migration, no import-map change; read before deploying:**
|
||||
1. `IAPL_IP_HEADER` must be pinned in production (`x-forwarded-for` behind Coolify/Traefik): failed staff sign-ins are
|
||||
@@ -39,7 +39,7 @@ no migration, no import-map change; read before deploying:**
|
||||
**Check:** five wrong passwords for an editor from one address → `429` there, `200` from another; the account page
|
||||
shows "Current password"; `curl -X POST <site>/api/users/login -H 'Origin: https://other.example' …` → `403`.
|
||||
|
||||
**→ 1.18.0, two-step verification confirmed by e-mail (CHANGELOG 1.18.0; security.md "Set-up confirmed by e-mail") —
|
||||
**→ 1.18.0, two-step verification confirmed by e-mail (CHANGELOG 1.18.0; PROGRAMISTA §6, item 88; security.md "Set-up confirmed by e-mail") —
|
||||
check before deploying:** (1) e-mail works on the site (Site integrations → E-mail sending → "Send a test e-mail");
|
||||
(2) `serverURL` is set (`NEXT_PUBLIC_SERVER_URL`); (3) tell the staff: whoever sets two-step verification up for the
|
||||
first time gets a link by e-mail and opens it in the same browser, then signs in again. Accounts that already have it
|
||||
@@ -65,14 +65,34 @@ correct place `// iapl-security-ok: <why>`. **Check:** `curl -s '<site>/api/page
|
||||
`curl -s -o /dev/null -w '%{http_code}' '<site>/api/pages?sort=%24where'` → `400`;
|
||||
`pnpm exec iapl-doctor --url <site> --only live-probes` → no finding.
|
||||
|
||||
**→ 1.17.2, security (CHANGELOG 1.17.2; PROGRAMISTA §6, items 84–87) — nothing required, check:** `readVersions:
|
||||
**→ 1.18.0, speed and growth (CHANGELOG 1.18.0 "Speed and growth"; PROGRAMISTA §6, items 91, 94; performance.md) —
|
||||
no migration; MongoDB gets a hidden date on two logs; check before deploying:** (1) `pnpm exec iapl-doctor` — the
|
||||
`perf-*` rules are **errors** now: fix what they name or lower / silence a rule with a reason in `iapl-doctor.json`;
|
||||
a site with Playwright and no budget test gets `perf-budgets` (copy the `iapl-performance` template); (2) JPEG / PNG
|
||||
uploads lose their metadata (`buildOptimizeUploadHook({ stripMetadata: false })` keeps it); (3) MongoDB: old consent
|
||||
records (1095 days) and statistics (90 days) are deleted by a TTL index within a minute of the first start
|
||||
(`ttlIndex: false` on `consentLog` / `stats`); (4) a plugin collection or global whose versions you turned on keeps 20
|
||||
per document unless you set `max` / `maxPerDoc`; (5) `BuilderForm` and `Turnstile` from `/client` are lazy (same
|
||||
props, the HTML is complete); the eager ones: `@intecion/ipal-kit/client/eager`; (6) a helper without its own
|
||||
`'use client'` imported from `/client` into a server component is the plain function now (do not pass it to a client
|
||||
component as a prop); (7) `pnpm exec iapl-skills` installs `iapl-performance`; `unusedMedia: true` needs
|
||||
`pnpm generate:importmap`. **Check:** `pnpm exec iapl-doctor --only performance` → no error; the site's forms still
|
||||
send.
|
||||
|
||||
**→ 1.18.0, drafts left out of related documents (CHANGELOG 1.18.0 "Content and plugin writes"; PROGRAMISTA §6,
|
||||
item 93; content.md "Drafts as related documents") — nothing to run:** a menu link, a block or a System pages link that
|
||||
points at a page never published no longer shows on the site (its title, slug and text are left out); a preview keeps
|
||||
it. The old behaviour: `createContentHelpers({ draftRelations: 'keep' })`. **Check:** a menu link to an unpublished
|
||||
page is gone on the live site and back after publishing.
|
||||
|
||||
**→ 1.18.0 (from 1.17.2, never released alone), security (CHANGELOG 1.18.0 "From 1.17.2"; PROGRAMISTA §6, items 84–87) — nothing required, check:** `readVersions:
|
||||
readPublished()` now works (a wrapper of your own around it: use `readPublishedVersions()` inside); behind a proxy
|
||||
that rewrites `Host` without `X-Forwarded-Host`, set `serverURL` or the panel's mail / cookie buttons answer 403
|
||||
(`iapl-doctor` warns); a locked editor sees "incorrect" until the lock ends (`accounts.lockedAnswer: 'payload'` for
|
||||
Payload's text); saving Cookies with a lower consent version is refused (`cookieSettings.allowLowerPolicyVersion`).
|
||||
**Check:** `curl -s <site>/api/pages/versions` as a visitor → 200 (published only), not 500.
|
||||
|
||||
**→ 1.17.2:** (1) Payload jobs: if the project has tasks or workflows and a cron calls `/api/payload-jobs/run` (or
|
||||
**→ 1.18.0 (from 1.17.2):** (1) Payload jobs: if the project has tasks or workflows and a cron calls `/api/payload-jobs/run` (or
|
||||
`/handle-schedules`) without its own `jobs.access.run`, set `CRON_SECRET` (16+ characters) in the app's environment
|
||||
and send `Authorization: Bearer <CRON_SECRET>` from the cron; in-process runs (`jobs.autoRun`, `payload jobs:run`)
|
||||
and an admin's API key need nothing (security.md "Payload's job queue"). Verify: the run route answers 401 without
|
||||
@@ -81,7 +101,7 @@ the header, 200 with it. (2) A front end that posted to `/api/form-submissions`
|
||||
(3) A site with a visitor login collection: `iapl-doctor --url …` lists `visitor-writes`; give each listed collection
|
||||
and global its own write rule (`adminOrEditor`). (4) If the project has `tests/routes.ts`: `update`, judge, commit.
|
||||
|
||||
**→ 1.17.2, cookie button (CHANGELOG 1.17.2; PROGRAMISTA §6, item 83; consent.md "Where the cookie button sits") — nothing is required:**
|
||||
**→ 1.18.0 (from 1.17.2), cookie button (CHANGELOG 1.18.0 "From 1.17.2"; PROGRAMISTA §6, item 83; consent.md "Where the cookie button sits") — nothing is required:**
|
||||
visitors now see the "cookie settings" button in the bottom corner of the window on every page; it never moves and
|
||||
no longer rides up above the footer. While it is shown the footer is a little taller (about 40 px on the reference
|
||||
site), so its last row ends above the button. Check the end of a page on a phone and on desktop: nothing under the
|
||||
@@ -322,7 +342,7 @@ and the browser tab shows the same separator.
|
||||
cookie banner only through `--ipal-*-dark`: check the banner in the dark theme.
|
||||
4. Optional: the block library, block by block (block-library.md); after turning blocks on: `pnpm generate:types`,
|
||||
`pnpm payload generate:importmap`, Postgres/SQLite `migrate:create`.
|
||||
5. **CookieButton** lifts above the footer — check a site with its own fixed footer bar; `avoid={false}` keeps it fixed. (Since 1.17.2 it stays in the bottom corner by default; the lift is `avoid={COOKIE_BUTTON_AVOID}`.)
|
||||
5. **CookieButton** lifts above the footer — check a site with its own fixed footer bar; `avoid={false}` keeps it fixed. (Since 1.18.0 it stays in the bottom corner by default; the lift is `avoid={COOKIE_BUTTON_AVOID}`.)
|
||||
6. `pnpm exec iapl-skills` (new **iapl-doctor**; updated iapl-reference, iapl-setup, iapl-site, iapl-audit).
|
||||
7. Run `pnpm exec iapl-doctor` (and `--url https://<site>`), fix or silence each finding with a reason in
|
||||
`iapl-doctor.json`. `IAPL_DOCTOR_TOKEN` (≥ 32 characters) only if the deep check runs against production.
|
||||
@@ -742,7 +762,7 @@ PROGRAMISTA §6, items 73–75; email.md; AGENT.md §7.2) — nothing to run; re
|
||||
**Send test e-mail** names the transport you expect; a form submission arrives. **The service is live at
|
||||
`https://webservices.intecion.net/mail`; a new site waits until a person of Intecion confirms it ("Połącz z IWSN") — keep SMTP until then, or `relay: false`.**
|
||||
|
||||
**→ 1.18.0, IWSN is connected by a person of Intecion (CHANGELOG "Unreleased (for 1.18.0)" → "IWSN: Połącz z IWSN"; email.md "The mail service"; AGENT.md §7.2 point 5) — nothing to run:**
|
||||
**→ 1.18.0, IWSN is connected by a person of Intecion (CHANGELOG 1.18.0 "IWSN"; PROGRAMISTA §6, item 90; email.md "The mail service"; AGENT.md §7.2 point 5) — nothing to run:**
|
||||
1. No schema change, no migration, no import-map change. Sites whose "Sending method" is SMTP or Microsoft Graph see no
|
||||
change at all.
|
||||
2. A site on IWSN that is already active stays active. A site that waits (`relay-pending`, or doctor `mail-relay-connect`
|
||||
|
||||
Reference in New Issue
Block a user