Prepare for publication#5
Conversation
…liance, and improve code quality.
- Align text domain to `universal-oid4vci` across block.json and editor scripts. - Add nonce verification on the credential-issue form handlers in both blocks. - Justify $_SESSION read and external walletUrl read with documented phpcs:ignore. - Register the legacy `openid4vc-issue-organisation-wallet` block name as an alias so pre-rename posts continue to render via the business-wallet template. - Generate `languages/universal-oid4vci.pot` and include the languages directory in the shipped zip. - Rewrite readme.txt to add Requires at least, Requires PHP, Stable tag, external-service disclosure, privacy notes, expanded description, and upgrade notice. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| msgstr "" | ||
| "Project-Id-Version: Universal OID4VCI 0.4.0\n" | ||
| "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/universal-oid4vci\n" | ||
| "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
There was a problem hiding this comment.
Moet hier geen email adres staan
There was a problem hiding this comment.
Niet nodig. Last-Translator: FULL NAME <EMAIL@ADDRESS> is de standaard placeholder die wp i18n make-pot altijd genereert voor een .pot-template. Het veld is bedoeld voor vertalers die een .po-bestand aanmaken, niet voor de template zelf. WordPress.org / GlotPress gebruikt het veld niet en accepteert de placeholder.
| if (isset($_SESSION['presentationResponse'])) { | ||
| $presentationResponse = $_SESSION['presentationResponse']; | ||
| // $_SESSION['presentationResponse'] is populated by the companion OpenID4VP verifier flow on the same site; not external user input. | ||
| $presentationResponse = $_SESSION['presentationResponse']; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
There was a problem hiding this comment.
In de andere plugin is het gebruik van $_SESSION helemaal weggewerkt. Moet dat hier ook niet?
There was a problem hiding this comment.
Eens — we moeten hier $_SESSION ook wegwerken, om dezelfde redenen (plugin-review guidelines, caching, conflicten met andere plugins). In deze plugin staat $_SESSION ook nog in openid4vci-plugin.php (session_start op init) en in credentialIssueBusinessWallet/render.php, dus pak ik die meteen mee.
There was a problem hiding this comment.
Is het handig om dit te renamen? Volgens mij gaat het dan mis met bestaande plugins toch?
There was a problem hiding this comment.
Goed punt. File- en folder-renames raken bestaande posts niet — posts verwijzen alleen naar block-namen, niet naar bestanden. Het echte risico zat in de block-namen: in de rebrand-commit zijn er twee hernoemd (openid4vc-issue → openid4vc-issue-personal-wallet en openid4vc-issue-organisation-wallet → openid4vc-issue-business-wallet).
Voor de business-wallet block stond al een backwards-compat alias in openid4vci-plugin.php, voor de personal-wallet nog niet. Die heb ik zojuist toegevoegd, dus beide oude block-namen blijven renderen. Getest in wp-env: alle vier de namen zijn geregistreerd en renderen via het juiste render-bestand.
| @@ -1,10 +1,17 @@ | |||
| { | |||
| "name": "openid4vci-plugin", | |||
| "name": "universal-oid4vci", | |||
There was a problem hiding this comment.
Het wijzigen van de naam gaat ook fout. Blijkbaar is het nodig, maar dat betekent wel dat de nieuwe release niet backward compatible is met de huidige.
There was a problem hiding this comment.
Eens dat het niet volledig backwards-compatible is, maar de impact is kleiner dan het lijkt:
"name"inpackage.jsonis de NPM package-naam, niet de WP plugin-slug. WordPress identificeert de plugin op folder-naam, wordpress.org bepaalt de slug uitreadme.txt.- Bestaande instellingen blijven bewaard:
OPTION_NAME = 'openid4vci_options'is een class-constante (adminSettings/openid4vci-admin-options.php:7), niet afgeleid van de slug. Settings in de DB overleven een slug-wissel. - Bestaande post-content met de oude block-namen blijft renderen via de backwards-compat aliassen in
openid4vci-plugin.php(zowelopenid4vc-issuealsopenid4vc-issue-organisation-wallet). - Dit is de eerste wordpress.org submission, dus er is geen eerdere wp.org-release waarmee we niet-compatible kunnen zijn. Voor gebruikers die eerder vanuit GitHub geïnstalleerd hebben staat de upgrade-instructie in
readme.txtonder Upgrade Notice.
…block names. - Add src/openid4vp-session.php mirroring the wordpress-openid4vp-plugin session helper (same cookie name, transient prefix, TTL) so both plugins share one store. - Remove session_start() and $_SESSION reads from plugin init and both render files. - Register backwards-compat aliases for pre-rebrand block names (openid4vc-issue and openid4vc-issue-organisation-wallet). Addresses review comments on PR #5. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Prepare for publication