Andrey Antukh d80cb5f2dc 🐛 Fix plugin origin check breaking cross-origin plugin messaging
The origin check added in the previous commit compared event.origin
against window.location.origin (Penpot own origin). Since plugins
are cross-origin by design (hosted on the plugin author domain),
this check rejected every legitimate message from every real plugin.

The event.source-based sender routing (matching iframeWindow identity)
is the correct and sufficient security mechanism - it cannot be forged
cross-origin, so the redundant origin check was removed.

- Removed event.origin check from load-plugin.ts message listener
- Updated tests to use realistic plugin origins (localhost:4202/4203)
  and to verify rejection based on source identity, not origin
- Fixed documentation examples: use event.source for receiving
  validation and '*' for postMessage targetOrigin

AI-assisted-by: mimo-v2.5-pro
2026-08-17 10:37:03 +00:00
..
2024-10-30 13:30:02 +01:00
2024-10-30 13:30:02 +01:00
2024-10-30 13:30:02 +01:00
2026-01-22 13:55:41 +01:00
2025-10-28 11:04:09 +01:00
2024-10-30 13:30:02 +01:00
2024-10-30 13:30:02 +01:00
2024-10-30 13:30:02 +01:00
2024-10-30 13:30:02 +01:00
2024-10-30 13:30:02 +01:00
2026-01-22 13:55:41 +01:00
2024-10-30 13:30:02 +01:00

Penpot Docs

Penpot documentation website.

Usage

To view this site locally, first set up the environment:

# only if necessary
nvm install
nvm use
corepack enable

pnpm install

And launch a development server:

pnpm start

You can then point a browser to http://localhost:8080.

Tooling