Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10572

Unguarded includes in acp/

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.0.8
    • 3.2.0-a1
    • ACP
    • PHP Version 5.3.1, MySQL 5.1.44

    Description

      There are 36 include's in the includes/acp files, such as this one (line 31 in include/acp/acp_ban.php):

      include($phpbb_root_path . 'includes/functions_user.' . $phpEx);

      which isn't guarded by function_exists, as on line 1865 in includes/function_convert.php:
      if (!function_exists('user_add')), wh

      { include($phpbb_root_path . 'includes/functions_user.' . $phpEx); }

      Even though my analysis is based on 3.0.8 I just checked and the problem is still present in 3.0.10 RC3.

      That these includes are not guarded raises "Cannot redeclare..." as function_user.php is very useful to include, if one would want to implement an new authentification mechanism (such as auth_apache.php).

      Either these includes should be changed to include_once or they should be guarded by function_exists. I would go for include_once, but then I guess all of the includes in the repository should be changed to include_once for consistency.

      See http://area51.phpbb.com/phpBB/viewtopic.php?f=99&t=42417 for a discussion on the issue.

      Attachments

        Activity

          People

            nicofuma nicofuma
            jakobgt jakobgt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: