Skip to content

Bump version v2.7.12#137

Merged
RishadAlam merged 13 commits intomainfrom
fix/plugin-review-team-issues
Mar 10, 2026
Merged

Bump version v2.7.12#137
RishadAlam merged 13 commits intomainfrom
fix/plugin-review-team-issues

Conversation

@RishadAlam
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings March 10, 2026 05:45
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request delivers a new version of the plugin, focusing on enhancing the ActiveCampaign integration with tag update capabilities and refining its contact management. It also includes critical bug fixes for several integrations, such as SendFox, WooCommerce, Salesforce, and Google Products, ensuring more robust and reliable data synchronization. Furthermore, the PR improves the handling of OAuth routes by adjusting sanitization practices and updates core dependencies to maintain broader compatibility.

Highlights

  • ActiveCampaign Integration: Introduced a new feature to update existing contact tags in ActiveCampaign and refactored the contact handling logic for improved efficiency and maintainability.
  • Route Sanitization: Removed unnecessary sanitization on several OAuth-related routes across various integrations (e.g., ConstantContact, Dropbox, Google, Keap, MailChimp, Mailup, Mautic, Notion, OneDrive, PCloud, Salesforce, Zoho products, Zoom) to ensure smoother OAuth flows and prevent data corruption.
  • SendFox Integration Fixes: Resolved issues causing blank pages and field map disappearances within the SendFox integration by externalizing field definitions and improving field mapping logic.
  • WooCommerce Data Handling: Fixed an issue where billing and shipping addresses were being overwritten and improved data processing by filtering out empty values from order data.
  • Salesforce and Google Products Fixes: Addressed a bug related to lead response types in Salesforce and authentication issues in Google Products integrations.
  • Dependency Updates: Downgraded several Symfony components (e.g., console, event-dispatcher, filesystem, finder, options-resolver, process, stopwatch, string) to support a broader range of PHP versions (from 8.4 to 8.2), and updated the Composer plugin API version.
  • Plugin Version Bump: Updated the plugin version to v2.7.12 across all relevant files.
Changelog
  • ActiveCampaign
    • Tags update feature added.
    • Refactored update contact handling.
  • Brekadance
    • Fixed trigger listening data issue (Pro).
  • Custom Function
    • Improved validator logic.
  • Google Products
    • Fixed authentication issue.
  • Salesforce
    • Fixed lead response type issue.
  • SendFox
    • Fixed blank page issue.
    • Fixed fieldmap disappearance issue.
  • WooCommerce
    • Fixed billing and shipping address overwrite issue.
  • get-access-token
    • Removed unnecessary sanitation on get-access-token routes for smoother OAuth flow.
Activity
  • The pull request author, RishadAlam, initiated this change to bump the plugin version to v2.7.12, indicating a new release incorporating the described features, improvements, and bug fixes.
  • No specific reviewer comments or discussions are available in the provided context, suggesting a straightforward integration of these changes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a version bump to 2.7.12, accompanied by significant refactoring, bug fixes, and new features, including a more robust data sanitization method in the routing utility and performance enhancements. However, a critical security vulnerability was identified in the core routing logic: the AJAX handlers lack proper capability-based authorization checks, potentially allowing any logged-in user to perform administrative actions. It is strongly recommended to enforce access control using current_user_can() in the routing layer or within all sensitive controller methods. Additionally, there's a critical bug in the SendFox integration layout component that could cause a runtime error, which needs to be addressed.

Comment on lines +36 to +48
const setMainAction = (value) => {
setSendFoxConf(prev => create(prev, draft => {
draft[field] = value

if (value === '2') {
draft.field_map = generateMappedField(newConf)
} else if (value === '1') {
draft.field_map_list = generateListMappedField(newConf)
} else if (value === '3') {
draft.field_map_unsubscribe = generateunsubscribeMappedField(newConf)
}
}))
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The variables field and newConf are not defined within the scope of the setMainAction function. It seems field should be the string 'mainAction', and newConf should be sendFoxConf. Additionally, the select element for choosing an action is missing its onChange handler, which should call this setMainAction function.

Suggested change
const setMainAction = (value) => {
setSendFoxConf(prev => create(prev, draft => {
draft[field] = value
if (value === '2') {
draft.field_map = generateMappedField(newConf)
} else if (value === '1') {
draft.field_map_list = generateListMappedField(newConf)
} else if (value === '3') {
draft.field_map_unsubscribe = generateunsubscribeMappedField(newConf)
}
}))
}
const setMainAction = (value) => {
setSendFoxConf(prev => create(prev, draft => {
draft.mainAction = value
if (value === '2') {
draft.field_map = generateMappedField(sendFoxConf)
} else if (value === '1') {
draft.field_map_list = generateListMappedField(sendFoxConf)
} else if (value === '3') {
draft.field_map_unsubscribe = generateunsubscribeMappedField(sendFoxConf)
}
}))
}

$data = $noSanitize
? $decoded
: (\is_object($decoded) || \is_array($decoded) ? map_deep($decoded, 'sanitize_text_field') : $decoded);
: (\is_object($decoded) || \is_array($decoded) ? map_deep($decoded, [__CLASS__, 'sanitizeValue']) : $decoded);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-high high

The Route::action() method, which serves as the central handler for all plugin AJAX requests, lacks a proper authorization check (e.g., current_user_can()). While the method verifies a nonce, WordPress nonces are not intended for access control and can be generated by any authenticated user. This flaw allows low-privileged users (such as Subscribers) to execute administrative functions registered by the plugin, including generating OAuth tokens and fetching sensitive integration data.

Remediation:
Implement a capability check at the beginning of the action() method or within the individual controller methods to ensure that only users with the appropriate permissions (e.g., manage_options or the plugin's custom manage_integrations capability) can access these endpoints.


private static function getResponseType()
{
return strpos(HttpHelper::$responseCode, 20) === 0 ? 'success' : 'error';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The strpos function expects string arguments, but HttpHelper::$responseCode can be an integer, and 20 is an integer literal. This can lead to unexpected behavior or errors in different PHP versions. It's safer to cast the response code to a string and use a string for the needle.

        return strpos((string) HttpHelper::$responseCode, '20') === 0 ? 'success' : 'error';

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR bumps the plugin version to v2.7.12 and updates both backend and frontend pieces related to the release, including changelog entries, ActiveCampaign enhancements, SendFox UI refactors, and request sanitization adjustments for OAuth/token flows.

Changes:

  • Bump plugin version to 2.7.12 and add the 2.7.12 changelog entries.
  • Add ActiveCampaign tag update option and refactor ActiveCampaign contact update handling.
  • Refactor parts of SendFox field mapping UI and adjust backend request sanitization (type-aware sanitizer + no_sanitize on multiple token routes).

Reviewed changes

Copilot reviewed 48 out of 50 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
readme.txt Updates stable tag and adds 2.7.12 changelog.
languages/generatedString.php Adds new i18n strings for ActiveCampaign tag update + minor ordering shift.
frontend/src/resource/sass/app.scss Comments out .bit-logo background styles.
frontend/src/pages/Welcome.jsx Adds FlowBuilder preloading on create-integration intent events.
frontend/src/pages/ChangelogToggle.jsx Updates release date and changelog items for 2.7.12.
frontend/src/pages/AllIntegrations.jsx Adds FlowBuilder preloading on create-integration intent events.
frontend/src/components/AllIntegrations/SendFox/SendFoxUnsubscribeFieldMap.jsx Refactors unsubscribe field list handling and exports default fields.
frontend/src/components/AllIntegrations/SendFox/SendFoxListFieldMap.jsx Refactors list field list handling and exports default fields.
frontend/src/components/AllIntegrations/SendFox/SendFoxIntegLayout.jsx Refactors action options and introduces mutative draft update helper.
frontend/src/components/AllIntegrations/SendFox/SendFoxFieldMap.jsx Refactors contact field list handling and exports default fields.
frontend/src/components/AllIntegrations/SendFox/SendFoxCommonFunc.js Moves required field generation to use exported field definitions.
frontend/src/components/AllIntegrations/SendFox/SendFox.jsx Removes actions/fields constants from config state.
frontend/src/components/AllIntegrations/ActiveCampaign/ActiveCampaignActions.jsx Adds tag-update toggle and generalizes action handler.
composer.lock Updates locked dependency versions and composer plugin API version.
bitwpfi.php Bumps plugin header version and BTCBI_VERSION.
backend/Triggers/WC/WCHelper.php Filters empty values before merging order/ACF/checkout/extra data.
backend/Core/Util/Route.php Uses type-aware sanitizer to preserve JSON booleans/numbers.
backend/Core/Util/HttpHelper.php Adds delete() request wrapper.
backend/Core/Util/Activation.php Replaces match with switch for upgrade task selection.
backend/Config.php Bumps Config::VERSION to 2.7.12.
backend/Actions/ZoomWebinar/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/Zoom/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/ZohoSheet/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/ZohoRecruit/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/ZohoMarketingHub/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/ZohoDesk/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/ZohoCreator/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/ZohoCampaigns/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/ZohoCRM/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/ZohoBigin/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/ZohoAnalytics/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/Salesforce/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/Salesforce/RecordApiHelper.php Refactors response-type detection logic for lead/contact actions.
backend/Actions/PCloud/Routes.php Marks authorization route as no_sanitize().
backend/Actions/OneDrive/Routes.php Marks authorization route as no_sanitize().
backend/Actions/Notion/Routes.php Marks authorization route as no_sanitize().
backend/Actions/Mautic/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/Mailup/Routes.php Marks authorization route as no_sanitize().
backend/Actions/MailChimp/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/LionDesk/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/Keap/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/GoogleSheet/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/GoogleDrive/Routes.php Marks authorization route as no_sanitize().
backend/Actions/GoogleContacts/Routes.php Marks authorization route as no_sanitize().
backend/Actions/GoogleCalendar/Routes.php Marks authorization route as no_sanitize().
backend/Actions/GoogleCalendar/GoogleCalendarController.php Minor formatting/spacing change.
backend/Actions/Dropbox/Routes.php Marks authorization route as no_sanitize().
backend/Actions/ConstantContact/Routes.php Marks generate-token route as no_sanitize().
backend/Actions/ActiveCampaign/RecordApiHelper.php Refactors field mapping/update logic and adds tag update behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +5 to +7
import { contactFields } from './SendFoxFieldMap'
import { listFields } from './SendFoxListFieldMap'
import { unsubscribeFields } from './SendFoxUnsubscribeFieldMap'
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SendFoxCommonFunc now imports contactFields/listFields/unsubscribeFields from the FieldMap components, but those components also import functions from SendFoxCommonFunc, creating a circular module dependency. This can lead to undefined exports at runtime depending on evaluation order. Move the shared field definitions into a separate constants module (or keep them in SendFoxCommonFunc and have components import from there) to break the cycle.

Copilot uses AI. Check for mistakes.
Comment on lines +36 to +46
const setMainAction = (value) => {
setSendFoxConf(prev => create(prev, draft => {
draft[field] = value

if (value === '2') {
draft.field_map = generateMappedField(newConf)
} else if (value === '1') {
draft.field_map_list = generateListMappedField(newConf)
} else if (value === '3') {
draft.field_map_unsubscribe = generateunsubscribeMappedField(newConf)
}
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setMainAction references undeclared identifiers (field and newConf) and create from mutative is only used inside this broken helper. If this handler gets wired up later it will throw at runtime; if it’s not needed, it should be removed along with the unused import. If it is needed, update it to set draft.mainAction (or the intended property) and use the current config when regenerating the appropriate field_map*.

Copilot uses AI. Check for mistakes.
Comment on lines +506 to +509
private static function getResponseType()
{
return strpos(HttpHelper::$responseCode, 20) === 0 ? 'success' : 'error';
}
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getResponseType() is using strpos(HttpHelper::$responseCode, 20) which will misclassify 2xx responses like 204 (it doesn’t start with "20") and also relies on implicit int→string conversion. Cast the response code to string and check the first digit (or use an integer range check like 200–299) to reliably detect success.

Copilot uses AI. Check for mistakes.
Comment on lines +135 to +138
if (!empty($tags)) {
if ($integrationDetails->actions->tagUpdate) {
$result['tags_removed'] = HttpHelper::delete("{$this->_apiEndpoint}/contactTags/{$contactId}", null, $this->_defaultHeader);
}
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$integrationDetails->actions->tagUpdate is accessed without guarding that actions exists, which can trigger warnings/notices (and in newer PHP versions, runtime warnings) when actions are missing. Use a safe check like !empty($integrationDetails->actions->tagUpdate) (or pass/use the $actions argument already available in execute()) before attempting tag removal.

Copilot uses AI. Check for mistakes.
Comment on lines +101 to 103
label: 'Brekadance',
desc: 'Fixed trigger listening data issue.',
isPro: true
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The integration name is misspelled as "Brekadance"; elsewhere in the codebase it appears as "Breakdance". Please correct this label to avoid inconsistent naming in the UI/changelog.

Copilot uses AI. Check for mistakes.
Comment on lines +738 to +739
- Brekadance: Fixed trigger listening data issue (Pro).

Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog entry misspells the integration as "Brekadance"; it should be "Breakdance" for consistency with the product/integration name used elsewhere.

Copilot uses AI. Check for mistakes.
@RishadAlam RishadAlam merged commit 2eff7bd into main Mar 10, 2026
4 of 5 checks passed
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.

3 participants