2FA screens: the brand image loads for a session that still owes its code; browser spec checks it
The tab icon endpoint answers with the image itself instead of a redirect to the media file, and the logo components hand a session that owes its 2FA code (or has not set 2FA up) the picture fetched without credentials, as an anonymous visitor gets it. Who can read media is unchanged; when the file is not public or is larger than 512 KB the site name is used. Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
2aaaaa115a
commit
5d44ac3135
@@ -31,6 +31,9 @@ once there are more than 20.
|
||||
- Options: `twoFactor.requireSetup: false | { windowHours, exempt }`, `twoFactor.resetAccess`. Exports:
|
||||
`twoFactorSetupState`, `twoFactorSetupDeadline`; admin components `TwoFactorStatusField`, `TwoFactorResetButton`,
|
||||
`TwoFactorAlert`.
|
||||
- The panel's tab icon and logo load on the verify and setup screens: `GET /api/ipal/admin-icon` answers with the
|
||||
image itself (no redirect to the media file), and the logo components give a session that still owes its code
|
||||
the picture as an anonymous visitor would get it. No change to who can read `media`.
|
||||
- ipal-doctor: the `2fa` rule says how many accounts without 2FA are blocked (`usersSetupClosed` in the deep
|
||||
status), warns when `requireSetup` is switched off and notes a missing setup window.
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ Admin panel components from `@intecion/ipal-kit/admin` — the project does NOT
|
||||
| `IntecionCredit` | `@intecion/ipal-kit/admin` | The line "Technology support: Intecion.com" (admin language; `agency` prop = the name) below the nav and below the login form (`variant: 'nav' \| 'login'`). Injected by the plugin with `whiteLabel`; turn off: `whiteLabel: { credit: false }` or `agency: false`. |
|
||||
| `buildAdminMeta({ agency, apiRoute?, defaultLocale?, meta?, options? })` | `@intecion/ipal-kit` | The `adminMeta` step: static panel meta (robots, preview image, icon) without overwriting keys in `meta`; returns `{ meta, resolved }` |
|
||||
| `adminMetaForSite(site, resolved)`, `syncAdminMeta(payload, resolved, { nameField?, settingsSlug? })` | `@intecion/ipal-kit` | Site-name parts (suffix, description, siteName); `syncAdminMeta` writes them into the live config (onInit + Site settings afterChange, never throws) |
|
||||
| `buildAdminImageEndpoints(resolved, { settingsSlug?, nameField?, logoField?, iconField? })` | `@intecion/ipal-kit` | `GET /api/ipal/admin-og` (1200×630 PNG via `next/og`) and `GET /api/ipal/admin-icon` (favicon redirect or initials) — already added by `adminMeta` |
|
||||
| `buildAdminImageEndpoints(resolved, { settingsSlug?, nameField?, logoField?, iconField? })` | `@intecion/ipal-kit` | `GET /api/ipal/admin-og` (1200×630 PNG via `next/og`) and `GET /api/ipal/admin-icon` (the favicon itself, or initials) — already added by `adminMeta` |
|
||||
| `DEFAULT_AGENCY`, `ADMIN_META_TEXTS` | `@intecion/ipal-kit` | Default agency `{ name: 'Intecion.com', url }`; en/pl meta texts (`{site}`, `{agency}`). Types `AdminMetaOptions`, `AgencyOption`, `ResolvedAdminMeta` |
|
||||
|
||||
## Readable array rows in the panel (`admin-ui`) — details: `node_modules/@intecion/ipal-kit/docs/links.md`
|
||||
|
||||
@@ -490,6 +490,13 @@ twoFactor: {
|
||||
`twoFactorSetupRequired`, `twoFactorSetupClosed`, `twoFactorStatus*`, `twoFactorReopen`, `twoFactorReset*`,
|
||||
`twoFactorAlert*`.
|
||||
|
||||
**The brand on the setup and verify screens.** A session that still owes its code is refused `media` like every
|
||||
other collection, so the browser could not load the panel's logo or tab icon from it. The plugin therefore hands
|
||||
such a session the picture itself — fetched on the server without any credentials, exactly as an anonymous visitor
|
||||
gets it (`AdminLogo` / `AdminIcon` as a `data:` address; `GET /api/ipal/admin-icon` always answers with the image
|
||||
instead of a redirect). Nothing is opened by this: when `media` is not publicly readable, or the file is larger
|
||||
than 512 KB, the site name (or the browser's own attempt) is used instead.
|
||||
|
||||
**What it does not do.** Inside the window, someone who knows the password of an account that has not set TOTP up
|
||||
can still set it up with their own authenticator. The real owner then cannot ("already set") and has to ask an
|
||||
administrator — the takeover is visible, and the window keeps it to the first days. So still: **create the
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ image. The plugin now fills the panel's `<head>` from Site settings, **with or w
|
||||
| `og:site_name` | the site name | your `admin.meta.openGraph.siteName` wins |
|
||||
| description | "Administration panel of <site>. Built on Payload CMS, technology support: Intecion.com." (Polish when the site's default locale is `pl`) | `adminMeta: { description: 'Panel of {site}' }` (string or `{ en, pl }`), `false`; `language: 'en' \| 'pl'`; your `admin.meta.description` wins |
|
||||
| preview image | `GET /api/ipal/admin-og` — 1200×630 PNG: the site's logo (or name), "Administration panel", "Technology support: Intecion.com" | `adminMeta: { image: '/my-og.png' }` or `false`; your `admin.meta.openGraph.images` wins |
|
||||
| icon | `GET /api/ipal/admin-icon` — redirects to the site's favicon, or draws the initials | `adminMeta: { icons: false }`; your `admin.meta.icons` win |
|
||||
| icon | `GET /api/ipal/admin-icon` — answers with the site's favicon itself (fetched as an anonymous visitor would get it; a redirect only when that is not possible), or draws the initials | `adminMeta: { icons: false }`; your `admin.meta.icons` win |
|
||||
| everything | on | `adminMeta: false` = Payload's defaults |
|
||||
|
||||
- **How:** Payload builds every panel page's metadata from `config.admin.meta`. The plugin sets the
|
||||
|
||||
Reference in New Issue
Block a user