Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CANTINA-913: Match protocol in CORS header #4964

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

rebeccahum
Copy link
Contributor

@rebeccahum rebeccahum commented Oct 23, 2023

Description

Only allow HTTPS origins on VIP

Changelog Description

Filter added: vip_only_https_origins

Only allow HTTPS origins on VIP

Pre-review checklist

Please make sure the items below have been covered before requesting a review:

  • This change works and has been tested locally (or has an appropriate fallback).
  • This change works and has been tested on a Go sandbox.
  • This change has relevant unit tests (if applicable).
  • This change uses a rollout method to ease with deployment (if applicable - especially for large scale actions that require writes).
  • This change has relevant documentation additions / updates (if applicable).
  • I've created a changelog description that aligns with the provided examples.

Pre-deploy checklist

  • VIP staff: Ensure any alerts added/updated conform to internal standards (see internal documentation).

Steps to Test

  1. curl 'https://example.net/wp-admin/admin-ajax.php?action=heartbeat' -H 'Origin: http://example.net' -I and expect to see access-control-allow-origin returned
  2. Apply patch
  3. Do step 1 again and expect to not see access-control-allow-origin returned

@rebeccahum rebeccahum marked this pull request as ready for review October 23, 2023 17:14
@rebeccahum rebeccahum requested a review from a team as a code owner October 23, 2023 17:14
Only allow HTTPS origins on VIP
@rebeccahum rebeccahum force-pushed the add/filter-allowed_http_origins branch from a70ce23 to 3f8bf14 Compare October 23, 2023 17:23
@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (746f135) 29.19% compared to head (e477bfc) 28.77%.
Report is 161 commits behind head on develop.

Files Patch % Lines
001-core.php 75.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #4964      +/-   ##
=============================================
- Coverage      29.19%   28.77%   -0.43%     
+ Complexity      4745     4742       -3     
=============================================
  Files            278      278              
  Lines          20899    20900       +1     
=============================================
- Hits            6101     6013      -88     
- Misses         14798    14887      +89     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

001-core.php Outdated Show resolved Hide resolved
@sjinks sjinks force-pushed the add/filter-allowed_http_origins branch from c13bc7d to 7090ecf Compare October 24, 2023 08:19
@sjinks sjinks force-pushed the add/filter-allowed_http_origins branch from 7090ecf to 4bcb875 Compare October 24, 2023 08:38
rebeccahum and others added 2 commits October 24, 2023 07:58
Co-authored-by: Volodymyr Kolesnykov <volodymyr.kolesnykov@automattic.com>
Copy link
Contributor

This pull request has been marked stale because it has been open for 60 days with no activity. If there is no activity within 7 days, it will be closed.

This is an automation to keep pull requests manageable and actionable and is not a comment on the quality of this pull request nor on the work done so far. Closed PRs are still valuable to the project and their branches are preserved.

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

Successfully merging this pull request may close these issues.

None yet

3 participants