Skip to content

Require origin for restricted widgets - #376

Open
bjarn wants to merge 1 commit into
ploi:mainfrom
bjarn:codex/fix-widget-origin-validation
Open

bjarn wants to merge 1 commit into
ploi:mainfrom
bjarn:codex/fix-widget-origin-validation

Conversation

@bjarn

@bjarn bjarn commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Use one origin validation function for both public widgets.
  • Fail closed when an allowlist exists but Origin and Referer are absent.
  • Keep exact-domain and subdomain matching.
  • Add tests for all headerless restricted endpoints.

Security impact

Requests without Origin or Referer bypassed configured widget domain restrictions.

Tests

  • php artisan test --compact tests/Feature/Widget/WidgetTest.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant