co-authored by
Claude Opus 5.5
parent
0dffd377a7
commit
0709141cae
+53
-16
@@ -9,13 +9,50 @@ versions at once, go through every "Requires project changes" section in order,
|
||||
version you have. A new release = a new section at the top; we remove the oldest ones only
|
||||
once there are more than 20.
|
||||
|
||||
## 1.17.2 — DRAFT (security group C, round 2: the owner's Q1–Q3; not released)
|
||||
## 1.17.2 — version history with readPublished, sign-in and panel actions, staff-only REST submissions and jobs, the cookie button
|
||||
|
||||
> Draft lines from session C (branch `claude/security-c-1172`); the integration session merges them with A's and B's.
|
||||
> No schema, migration or import-map change. **Read the first two lines if the site has a customer login collection
|
||||
> or uses Payload jobs over HTTP**; otherwise nothing changes for it.
|
||||
> **Read before upgrading.** No schema change, no migration on any database, no import-map change. What changes for
|
||||
> an existing site, most important first:
|
||||
>
|
||||
> 1. **Fix: `readPublished()` on version history.** The form 1.17.1 documented, `readVersions: readPublished()`,
|
||||
> answered every version read by a visitor or a plain account with **500** (MongoDB, Postgres and SQLite alike).
|
||||
> It now works by itself: iapl() gives that `readVersions` the new `readPublishedVersions()` with the same role.
|
||||
> Visitors see published versions only; a draft version by id is `403`; staff see everything, as before. A
|
||||
> `readVersions` of your own that **wraps** `readPublished()` is not changed: use `readPublishedVersions()` inside it.
|
||||
> 2. **A locked staff account is told "The email or password provided is incorrect."** (REST, GraphQL, the panel),
|
||||
> so five wrong passwords no longer tell a stranger that an address has a staff account. A locked editor with the
|
||||
> right password sees "incorrect" too until the lock ends (10 minutes); an admin can unlock it. Payload's message
|
||||
> back: `accounts: { lockedAnswer: 'payload' }`. Known: the answer's **time** still differs for an existing
|
||||
> account (Payload hashes only then); that is for 1.18.0.
|
||||
> 3. **The plugin's panel actions refuse other origins** (mail service Connect / Disconnect, Send test e-mail, cookie
|
||||
> scan, approval, site check): `403` for a request a browser marks as coming from elsewhere. The panel's buttons
|
||||
> work. **Behind a proxy that rewrites `Host` and sends no `X-Forwarded-Host`, set `serverURL`**, or those buttons
|
||||
> are refused too (the log says so once; `iapl-doctor` warns). Off: `adminSameOrigin: false`.
|
||||
> 4. **A customer account can no longer create form submissions over REST / GraphQL** (staff only). The site's own
|
||||
> forms (`submitForm`, `createSubmitAction`, the file endpoint) are not affected. Way back:
|
||||
> `forms.formSubmissionOverrides.access.create`.
|
||||
> 5. **Payload's job queue over HTTP: only an admin or `Authorization: Bearer <CRON_SECRET>`** (16+ characters), when
|
||||
> the project wrote no `jobs.access.run`. **A cron that calls `/api/payload-jobs/run` must set `CRON_SECRET` and
|
||||
> send the header**, or it gets `401`. In-process runs and a project's own rule are not affected;
|
||||
> `jobsRunAccess: false` keeps Payload's default.
|
||||
> 6. **The cookie button stays in the bottom corner and never moves**; while it is shown the footer gets a little
|
||||
> room under its last row (about 43 px on the reference site) so the button covers nothing. No layout shift.
|
||||
> No room: `<CookieButton reserve={false} />`; the placement before: `<CookieButton avoid={COOKIE_BUTTON_AVOID} />`.
|
||||
> 7. **The consent version only goes up** through the panel, REST and GraphQL (a lower number would make old consent
|
||||
> count again). The Local API with `overrideAccess` may still lower it; `cookieSettings: { allowLowerPolicyVersion: true }`
|
||||
> restores the old freedom.
|
||||
> 8. **IPv6 visitors are counted per /64** by every plugin rate limit (one home network shares a budget, as an
|
||||
> IPv4 home behind one router always did). Per address: `setIpv6Grouping({ prefix: 128 })`.
|
||||
|
||||
### Security
|
||||
- **Version history with `readPublished()`** (point 1): new `readPublishedVersions(minimum)` for `readVersions`;
|
||||
`withVersionReadRules(entities)` swaps a marked `readPublished()` on `readVersions` (iapl() runs it on the
|
||||
collections and globals it sees; a plugin listed after iapl() uses `readPublishedVersions()` itself).
|
||||
- **Locked staff accounts answer like a wrong password** (point 2): `lockedLooksWrong`, `withLockedAnswer`,
|
||||
`graphqlLoginName`; type `LockedAnswerOption`.
|
||||
- **Panel actions from the site's own origin only** (point 3): `requireOwnOrigin`, `guardAdminEndpoints`,
|
||||
`ADMIN_POST_ENDPOINTS`; type `AdminSameOriginOption`; `reportRefusedOrigin(req, origins?, context?)` takes a third
|
||||
argument; `iapl-doctor` warns (`csrf-empty`) without `serverURL` or `csrf`.
|
||||
- **A customer account can no longer create submissions over REST.** `POST /api/form-submissions` (and GraphQL
|
||||
`createFormSubmission`) needed only a signed-in account of any login collection, so a customer of a visitor
|
||||
collection could skip the rate limit, Turnstile, the consent tick and the validation, and the form's e-mails went
|
||||
@@ -28,19 +65,19 @@ once there are more than 20.
|
||||
environment and send the header; the start log says so when it is missing. In-process runs (`jobs.autoRun`,
|
||||
`payload jobs:run`) and a project's own rule are not affected; `iapl({ jobsRunAccess: false })` keeps Payload's
|
||||
default (security.md "Payload's job queue").
|
||||
- **The consent version only goes up** (point 7): `policyVersionNeverDown`, `buildCookieSettingsFields`,
|
||||
`buildCookieSettings(options)`; type `CookieSettingsFieldOptions`.
|
||||
- **IPv6 per network** (point 8): `setIpv6Grouping`, `ipRateKey`; type `Ipv6Grouping`. A second counter per /48 is
|
||||
available (`wide: 48`), off by default.
|
||||
|
||||
### Added
|
||||
- `iapl-doctor` deep rule **`visitor-writes`** (warning): on a site with a visitor login collection, every collection
|
||||
and global whose write rule lets such an account in, Payload's default included.
|
||||
- `jobsRunAccess`, `withJobsRunAccess`, `jobsRunNotice`, `cronSecretMatches`, `CRON_SECRET_ENV`,
|
||||
`CRON_SECRET_MIN_LENGTH`; option `jobsRunAccess`; env `CRON_SECRET`.
|
||||
|
||||
### Changed
|
||||
- The reference site (and every new site from `iapl create`): `Pages`, `Posts`, `CaseStudies`, `Media` and the
|
||||
`Header`, `Footer`, `Company` globals have their own write rules (`adminOrEditor`) instead of Payload's default.
|
||||
Existing sites: nothing changes; the doctor's `visitor-writes` names what to add where it matters.
|
||||
- Not built (owner's Q3 answer (a), planned for 2.0): a plugin-wide default for the project's own entities and for
|
||||
Payload's `payload-locked-documents`.
|
||||
- `CookieButton` prop `reserve` (the block that gets the room; `false` = off); `COOKIE_BUTTON_RESERVE`,
|
||||
`COOKIE_BUTTON_SPACE_ATTRIBUTE`, `reserveCookieButtonSpace` (`/client`, type `CookieButtonSpaceOptions`);
|
||||
`consentDecidedScript` (root); the token `--ipal-cookie-button-space`.
|
||||
|
||||
### Changed
|
||||
- **What an existing site's visitors see: the "cookie settings" button stays in the bottom corner of the window and
|
||||
@@ -58,11 +95,11 @@ once there are more than 20.
|
||||
`<CookieButton avoid={COOKIE_BUTTON_AVOID} />` (on `SiteProviders`: `cookieButton={…}`). A site that passes a
|
||||
selector in `avoid` keeps its behaviour. A project e2e test that expects the button above the footer, or an exact
|
||||
footer height after a decision, needs an update.
|
||||
|
||||
### Added
|
||||
- `CookieButton` prop `reserve` (the block that gets the room; `false` = off); `COOKIE_BUTTON_RESERVE`,
|
||||
`COOKIE_BUTTON_SPACE_ATTRIBUTE`, `reserveCookieButtonSpace` (`/client`, type `CookieButtonSpaceOptions`);
|
||||
`consentDecidedScript` (root); the token `--ipal-cookie-button-space`.
|
||||
- The reference site (and every new site from `iapl create`): `Pages`, `Posts`, `CaseStudies`, `Media` and the
|
||||
`Header`, `Footer`, `Company` globals have their own write rules (`adminOrEditor`) instead of Payload's default.
|
||||
Existing sites: nothing changes; the doctor's `visitor-writes` names what to add where it matters.
|
||||
- Not built (owner's Q3 answer (a), planned for 2.0): a plugin-wide default for the project's own entities and for
|
||||
Payload's `payload-locked-documents`.
|
||||
|
||||
## 1.17.1 — security fixes from the IAWL review; the panel's sign-in look; the sending method is chosen
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@intecion/ipal-kit",
|
||||
"version": "1.17.1",
|
||||
"version": "1.17.2",
|
||||
"description": "Intecion Advanced Payload Library — a Payload CMS 3 plugin: i18n, SEO, forms, consent, analytics, blog/archives.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
+1
-1
@@ -7,4 +7,4 @@
|
||||
* `/_next/static/media/`. Written by `node scripts/write-version.mjs` (the `version` script of
|
||||
* package.json runs it on `pnpm version …`); test/version.test.ts fails when the two differ.
|
||||
*/
|
||||
export const PLUGIN_VERSION = '1.17.1'
|
||||
export const PLUGIN_VERSION = '1.17.2'
|
||||
|
||||
Reference in New Issue
Block a user