Repository navigation
Conversation
The plugin runs with built-in defaults until an administrator saves the settings, and these are meant to be what the settings page shows (see DefaultSettings). Three were not: - deleteOld: the plugin purged failed logins after 4 weeks, the settings page showed 0 - so the first save of the settings switched purging off, contrary to the changelog. The page says 4 weeks now (com_bfstop). - logLevel: the plugin didn't log at all, the page showed "errors". - riskCommonUsernames: the page listed admin, administrator, root, test and webmaster, the plugin used an empty list (no risk points, and such names were stored as a hash when they aren't an account). They are in DefaultSettings now, which testUnsavedSettingsAreWhatTheSettings PageShows compares with the settings form. DatabaseHelper::$DEFAULT_PURGE_WEEKS is replaced by DefaultSettings['deleteOld']. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AFJFMMUpch4LGexEiXN8Nc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 4/4 for the 2.0.0 release (#250), based on #253. Review only the top commit. Merge together with codeling/com_bfstop#25, which is on the branch of the same name. CI tests the two branches together, and each fails CI without the other.
Problem
Until an administrator saves the settings, the plugin uses built-in defaults. These are meant to be what the settings page shows (
DefaultSettings, and the changelog's "Settings which have not been saved yet now have the values the settings page shows"). Comparing everyparams->get()default withcom_bfstop/admin/forms/settings.xmlfound three that weren't:deleteOldlogLevelLogHelperriskCommonUsernamesChange
Bfstop::DefaultSettingsand the plugin reads them from there.DatabaseHelper::$DEFAULT_PURGE_WEEKSis removed in favour ofDefaultSettings['deleteOld'].Tests
testUnsavedSettingsAreWhatTheSettingsPageShowscompares every key ofDefaultSettingswith the form, so it now covers all three; it fails against com_bfstopmain(deleteOld). The full suite passes locally on Joomla 5.4.10 with MySQL 8.4 and PostgreSQL 16, together with the com_bfstop branch.Generated by Claude Code