Skip to content

Upd. Settings. Add BFP option.#694

Open
svfcode wants to merge 4 commits into
devfrom
upd-settings-add-bfp-option
Open

Upd. Settings. Add BFP option.#694
svfcode wants to merge 4 commits into
devfrom
upd-settings-add-bfp-option

Conversation

@svfcode

@svfcode svfcode commented Jul 24, 2026

Copy link
Copy Markdown
Member

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a user-facing enable/disable switch for the Brute Force Protection (BFP) module and wires it through the React settings UI and runtime checks, while keeping the legacy SPBC_BFP_DISABLE constant as an override for backward compatibility.

Changes:

  • Introduces bfp__enabled default setting and renders it in the React General Settings “Authentication and Logging In” group.
  • Gates BFP execution in firewall and authentication flows based on bfp__enabled and SPBC_BFP_DISABLE.
  • Updates the General Settings “traffic light” overview to reflect BFP status (but currently misses the constant override—see comments).

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
security-malware-firewall.php Updates documentation around the legacy SPBC_BFP_DISABLE constant and points to the new setting.
lib/CleantalkSP/SpbctWP/State.php Adds default value for new bfp__enabled setting.
lib/CleantalkSP/SpbctWP/Settings/SettingsGeneralReact.php Groups/orders bfp__enabled with other auth/logging settings for React UI.
js/src/react/components/TabContent/TabSettingsGeneral/SettingsGroup.js Maps new setting key to a new React component.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/BfpEnabled.js Adds new checkbox UI for enabling/disabling BFP and managing dependencies.
js/src/react/components/TabContent/TabSettingsGeneral/Settings/BfpAllowedWrongAuths.js Removes heading/description now handled by the new enable setting.
inc/spbc-settings.php Updates the “traffic light” feature status for BFP to use bfp__enabled.
inc/spbc-firewall.php Loads the BFP firewall module only when enabled (and not disabled by constant).
inc/spbc-auth.php Runs brute-force auth check only when enabled (and not disabled by constant).

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

Comment thread inc/spbc-settings.php

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated no new comments.

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.

2 participants