Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-10267

Missing strlen() on $table_prefix in db tools index name length check

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0.10-RC1
    • 3.0.9
    • None
    • None

      		$table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
      		if (strlen($table_name . $index_name) - strlen($table_prefix) > 24)
      		{
      			$max_length = $table_prefix + 24;
      			trigger_error("Index name '{$table_name}_$index_name' on table '$table_name' is too long. The maximum is $max_length characters.", E_USER_ERROR);
      		}

      $max_length = $table_prefix + 24;

      Should be strlen($table_prefix) here.

            bantu Andreas Fischer [X] (Inactive)
            bantu Andreas Fischer [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: