use constant DB_MODULE => {
# MySQL 5.0.15 was the first production 5.0.x release.
- mysql => {db => 'Bugzilla::DB::Mysql', db_version => '5.0.15', name => 'MySQL'},
+ # We blocklist MySQL 8.0 and newer, and explicitly list MariaDB as an
+ # alternative. The db_blklst_str is shown in the auto-generated release notes
+ # instead of the regexp. We can't tell Maria apart from MySQL in our check
+ # and MariaDB skipped versions from 5 to 10, so we'll blocklist 8 and 9 for
+ # MariaDB as well just in case someone configured for 'mariadb' but actually
+ # has MySQL installed. See https://bugzilla.mozilla.org/show_bug.cgi?id=1851354
+ mysql => {db => 'Bugzilla::DB::Mysql', db_version => '5.0.15', name => 'MySQL',
+ db_blocklist => ['^[89]\.'], db_blklst_str => '>= 8.0'},
+ mariadb => {db => 'Bugzilla::DB::Mysql', db_version => '5.1', name => 'MariaDB',
+ db_blocklist => ['^[89]\.']},
pg =>
{db => 'Bugzilla::DB::Pg', db_version => '9.00.0000', name => 'PostgreSQL'},
oracle =>
$self->disconnect;
my $sql_want = $db->{db_version};
+ my $sql_dontwant = exists $db->{db_blocklist} ? $db->{db_blocklist} : [];
my $version_ok = vers_cmp($sql_vers, $sql_want) > -1 ? 1 : 0;
+ my $blocklisted;
+ if ($version_ok) {
+ $blocklisted = grep($sql_vers =~ /$_/, @$sql_dontwant);
+ $version_ok = 0 if $blocklisted;
+ }
my $sql_server = $db->{name};
if ($output) {
package => $sql_server,
wanted => $sql_want,
found => $sql_vers,
- ok => $version_ok
+ ok => $version_ok,
+ blocklisted => $blocklisted
});
}
# Check what version of the database server is installed and let
# the user know if the version is too old to be used with Bugzilla.
+ if ($blocklisted) {
+ die <<EOT;
+
+Your $sql_server v$sql_vers is blocklisted. Please check the
+release notes for details or try a different database engine
+or version.
+
+EOT
+ }
if (!$version_ok) {
die <<EOT;
sub _checking_for {
my ($params) = @_;
- my ($package, $ok, $wanted, $blacklisted, $found)
- = @$params{qw(package ok wanted blacklisted found)};
+ my ($package, $ok, $wanted, $blocklisted, $found)
+ = @$params{qw(package ok wanted blocklisted found)};
my $ok_string = $ok ? install_string('module_ok') : '';
$ok_string = install_string('module_not_found');
}
- my $black_string = $blacklisted ? install_string('blacklisted') : '';
+ my $block_string = $blocklisted ? install_string('blocklisted') : '';
my $want_string = $wanted ? "$wanted" : install_string('any');
- my $str = sprintf "%s %20s %-11s $ok_string $black_string\n",
+ my $str = sprintf "%s %20s %-11s $ok_string $block_string\n",
(' ' x $checking_for_indent) . install_string('checking_for'), $package,
"($want_string)";
print $ok ? $str : colored($str, COLOR_ERROR);
:paramval:`Sendmail`.
Unless you know what you are doing, and can deal with the possible problems
-of spam, bounces and blacklists, it is probably unwise to set up your own
+of spam, bounces and blocklists, it is probably unwise to set up your own
mail server just for Bugzilla. However, if you wish to do so, some guidance
follows.
# Forbid single quotes to delimit URLs, see bug 926085.
if ($data =~ /href=\\?'/) {
- ok(0, "$path contains blacklisted constructs: href='...'");
+ ok(0, "$path contains blocklisted constructs: href='...'");
}
else {
- ok(1, "$path contains no blacklisted constructs");
+ ok(1, "$path contains no blocklisted constructs");
}
# Forbid cgi.param(). cgi_param() must be used instead.
// =======================
//
// It is not necessary to list all products and components here.
-// Instead, you can define a "blacklist" for some commonly used words
+// Instead, you can define a "blocklist" for some commonly used words
// or word fragments that occur in a product or component name
// but should _not_ trigger product/component search.
// Product and Component Exceptions
// ================================
//
-// A blacklist for some commonly used words or word fragments
+// A blocklist for some commonly used words or word fragments
// that occur in a product or component name but should *not*
// trigger product/component search in QuickSearch.
The file ##file## must point to a TrueType or OpenType font file
(its extension must be .ttf or .otf).
END
- blacklisted => '(blacklisted)',
+ blocklisted => '(blocklisted)',
bz_schema_exists_before_220 => <<'END',
You are upgrading from a version before 2.20, but the bz_schema table
already exists. This means that you restored a mysqldump into the Bugzilla