Skip to content

Validation review: master and 3.3.x branches #75

Open

Description

@bonelifer

These reviews started from PHP warnings about a missing array key on a board running 1.0.0. Claude traced them to the missing isset() check in log_failed_login_attempts() on the 3.3.x branch (fixed in #74), then reviewed both branches in full to check for anything else.

Claude ran a full read-only validation review of both branches, following the Extensions Database validation policy and the phpBB coding guidelines. master was checked against phpBB master (4.0.0-a3-dev, 2a2dad2) and 3.3.x against phpBB 3.3.x (1b1ffdf). Every core event, service, function and language key the extension uses was looked up in that phpBB source.

Neither branch has a security or localization problem. The ACP module is limited to founders with a_board, uses a form key, reads all input with typed $request->variable() calls, and takes all text from language keys.

3.3.x branch (1.0.0)

Result: Deny, for one item. It is fixed in #74.

Blocking

  • event/listener.php line 188: log_failed_login_attempts() reads $event['result']['user_row']['user_id'], but login_box() leaves out user_row when the login form key check fails. With "Log failed login attempts" on, an expired login form raises Undefined array key "user_row" and Trying to access array offset on value of type null warnings on PHP 8. master already has the isset() check.

Non-blocking

  • composer.json: require.php is >=5.4, and soft-require allows phpBB 3.2.0. migrations/m4_serialize_to_json.php line 43 passes an options array to unserialize(), which needs PHP 7.0. On PHP 5.x the call returns null and the watched groups setting is emptied. Raise require.php to >=7.0, or the phpBB floor to 3.3.0.
  • event/listener.php (email change): USERNAME is $this->user->data['username']. When an admin changes a watched user's email in ACP > Users, the email names the admin instead of the account that changed. Use $event['user_row']['username'] when it is set.
  • event/listener.php line 236: on the UCP path, $event['data']['email'] is the posted value even without u_chgemail. Core keeps the old address in $event['sql_ary']['user_email'], so posting a different address sends a false "email changed" alert.
  • event/listener.php (strong passwords): the stricter rules aren't applied in the "I forgot my password" flow (phpbb/ucp/controller/reset_password.php). A member of a watched group can set a weaker password that way.
  • event/listener.php lines 151, 213, 245: @gethostbyaddr() does a blocking reverse DNS lookup during ACP login and the other actions, and the @ hides any failure.
  • language/en/email/acp_logs.txt: {LOG_MODE} gets the internal mode name (admin, mod, users), so translated templates get an English word.
  • ACP_TEAM_SECURITY_SETTINGS is defined in both language files with different text ("Settings" and "Team Security Settings"), so the ACP menu label changes on the module's own page.
  • adm/style/acp_teamsecurity.html: size and maxlength aren't valid on input type="number".
  • README.md still says the extension "is not ready to install on any live forum", while composer.json declares 1.0.0.
  • Formatting: missing space after the comma in add_lang('acp_teamsecurity','phpbb/teamsecurity').

master branch (1.1.0-dev, phpBB 4.0)

Result: Approve. The failed-login check is already fixed here.

Non-blocking

  • event/listener.php send_message(): the phpBB 4.0 email method doesn't check email_enable when sending, but the 3.3 messenger class did. Boards with board-wide email turned off still send these notifications. Check $this->email_method->is_enabled() first.
  • The same email-change USERNAME, UCP u_chgemail, password-reset, gethostbyaddr(), LOG_MODE, duplicate language key and number-input items as on 3.3.x (lines 161, 223, 246, 255 in this branch).
  • composer.json version 1.1.0-dev and the README's "not ready to install" note are fine for now, but both need to change before an Extensions Database submission.
  • Formatting: the add_lang() comma, and misaligned @param columns in the listener constructor docblock.

The non-blocking items are left for the maintainers to decide on. They came from reading the code; no board was used.


Investigated and written by Claude on behalf of William Jacoby (bonelifer).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions