Skip to content

fix: enforce HTTPS scheme check in CheckAllowedOrigins fallback path#820

Merged
Spomky merged 3 commits into5.2.xfrom
fix/https-scheme-check-ordering
Mar 23, 2026
Merged

fix: enforce HTTPS scheme check in CheckAllowedOrigins fallback path#820
Spomky merged 3 commits into5.2.xfrom
fix/https-scheme-check-ordering

Conversation

@Spomky
Copy link
Contributor

@Spomky Spomky commented Mar 23, 2026

Summary

  • Move HTTPS scheme check before host comparison in the fallback path (no allowed origins configured) of CheckAllowedOrigins, where it was previously unreachable dead code
  • Add $securedRelyingPartyId parameter to CheckAllowedOrigins to allow exempting specific RP IDs from HTTPS enforcement (e.g. localhost in development)
  • Add a final throw when neither host nor subdomain matches, replacing the former dead code path

Spomky and others added 2 commits March 23, 2026 08:48
…rigins fallback path

The HTTPS scheme check was unreachable in the fallback path (no allowed
origins configured) because the method returned early on host match.
Move the check before host comparison so it is always enforced.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Break long CheckAllowedOrigins constructor calls into multi-line format
- Regenerate PHPStan baseline to match current codebase state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Spomky Spomky added this to the 5.2.5 milestone Mar 23, 2026
@Spomky Spomky added the bug Something isn't working label Mar 23, 2026
@Spomky Spomky self-assigned this Mar 23, 2026
Remove baseline entries for $optionStorage and $icon deprecations that
no longer match reported errors in CI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Spomky Spomky merged commit 8ee7654 into 5.2.x Mar 23, 2026
25 of 27 checks passed
@Spomky Spomky deleted the fix/https-scheme-check-ordering branch March 23, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant