Skip to content

1.7.1

Choose a tag to compare

@sandymac sandymac released this 22 Oct 20:30
· 20 commits to main since this release
8a0fd75
    • A refresh-token replay no longer crashes before revoking the stolen family when the connection's access key has an all-digit key id. PHP turns such an id into an integer when it is used as an array key, and the api plugin's revokeKey() is typed string under strict types, so the theft sweep threw a TypeError after dropping the family's refresh tokens but before revoking its access key, which stayed live until it expired. About one key in 1,850 has such an id. The api plugin's own key lookup has the same slip (getgrav/grav-plugin-api#64): every request with such a key fails with a 500 whenever the api's verify cache has expired, which shows up as bursts of failed MCP calls. That one is the api plugin's to fix, and this plugin inherits the fix; until then, generating a new key is the workaround.
    • The theft sweep now also revokes the access key of every already-used refresh token in the family, not only the live ones. A refresh refused for a wrong client_id is marked used before the check, so its access key was never revoked and stayed out of the sweep when the family was later found stolen; revoking a key that rotation already revoked is a harmless no-op. Found in the security review of this release.
    • Triaged against api plugin 1.0.51 through 1.0.55 and Grav 2.2.11. The api floor stays at 1.0.50 and the Grav floor at 2.1.5. The route table, every parameter and every permission are unchanged, and the rest passes straight through: demo mode can grant part of an area with api.pages.create, api.pages.update, api.pages.delete, api.media.upload, api.media.update and api.media.delete, which are demo grants only, so the tools keep asking for api.pages.write and api.media.write (1.0.54); the api answers only at its own address, which does not touch this plugin because it dispatches through the api's router in-process using the address from the api's own settings (1.0.54); get_media_meta fields can be a number with a range, a date or a yes/no toggle, any field can be required, and saving metadata to several files checks every value before touching any of them (1.0.55); a page that exists only as a translation opens as that translation, and saving it in the missing language is refused (1.0.55); a file removed from a page's file field stays removed after saving (1.0.53); moving or reordering a page with a slug: in its frontmatter no longer renames its folder (1.0.51).