Skip to content

CRM: Fix errant object and tag retrieval params#48731

Merged
tbradsha merged 3 commits into
trunkfrom
fix/crm/prevent_errant_object_and_tag_retrieval_params
May 12, 2026
Merged

CRM: Fix errant object and tag retrieval params#48731
tbradsha merged 3 commits into
trunkfrom
fix/crm/prevent_errant_object_and_tag_retrieval_params

Conversation

@tbradsha
Copy link
Copy Markdown
Contributor

@tbradsha tbradsha commented May 12, 2026

Proposed changes

If true, '1', or 1 was passed as a value, it'd cast to string (as '1'), sanitize, and then compare with 'true', evaluating to false.

This switches things to use filter_var( $var, FILTER_VALIDATE_BOOLEAN ) instead.

Related product discussion/links

Does this pull request change what data or activity we track or use?

Testing instructions

  • Go to '..'

tbradsha added 2 commits May 12, 2026 13:04
If `true`, `'1'`, or `1` was passed as a value, it'd cast to string (as '1'), sanitize, and then compare with `'true'`, evaluating to `false`.
@tbradsha tbradsha self-assigned this May 12, 2026
@tbradsha tbradsha added the [Status] Needs Review This PR is ready for review. label May 12, 2026
@github-actions github-actions Bot added [CRM] API [Plugin] CRM Issues about the Jetpack CRM plugin labels May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@jp-launch-control
Copy link
Copy Markdown

jp-launch-control Bot commented May 12, 2026

Code Coverage Summary

Coverage changed in 2 files.

File Coverage Δ% Δ Uncovered
projects/plugins/crm/api/companies.php 0/40 (0.00%) 0.00% -3 💚
projects/plugins/crm/api/customers.php 0/47 (0.00%) 0.00% -3 💚

Full summary · PHP report

@tbradsha tbradsha merged commit 3331fd0 into trunk May 12, 2026
68 checks passed
@tbradsha tbradsha deleted the fix/crm/prevent_errant_object_and_tag_retrieval_params branch May 12, 2026 19:41
@github-actions github-actions Bot removed the [Status] Needs Review This PR is ready for review. label May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[CRM] API [Plugin] CRM Issues about the Jetpack CRM plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant