badwords: fix issues found in scripts and other files

Single pass, not enforced.

Also:
- pyspelling.words: drop `web page`

Closes #19572
This commit is contained in:
Viktor Szakats 2025-11-17 16:06:00 +01:00
parent 42c43f695c
commit ad35ecba97
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
45 changed files with 104 additions and 105 deletions

View file

@ -92,7 +92,7 @@ my @valid_mozilla_trust_purposes = (
my @valid_mozilla_trust_levels = (
"TRUSTED_DELEGATOR", # CAs
"NOT_TRUSTED", # Don't trust these certs.
"MUST_VERIFY_TRUST", # This explicitly tells us that it ISN'T a CA but is
"MUST_VERIFY_TRUST", # This explicitly tells us that it IS NOT a CA but is
# otherwise ok. In other words, this should tell the
# app to ignore any other sources that claim this is
# a CA.
@ -154,7 +154,7 @@ sub warning_message() {
print " 2) Default to 'release', but more recent updates may be found in other trees\n";
print " 3) certdata.txt file format may change, lag time to update this script\n";
print " 4) Generally unwise to blindly trust CAs without manual review & verification\n";
print " 5) Mozilla apps use additional security checks aren't represented in certdata\n";
print " 5) Mozilla apps use additional security checks are not represented in certdata\n";
print " 6) Use of this script will make a security engineer grind his teeth and\n";
print " swear at you. ;)\n";
exit;
@ -241,7 +241,7 @@ sub parse_csv_param($$@) {
sub sha256 {
my $result;
if($Digest::SHA::VERSION || $Digest::SHA::PurePerl::VERSION) {
open(FILE, $_[0]) or die "Can't open '$_[0]': $!";
open(FILE, $_[0]) or die "Could not open '$_[0]': $!";
binmode(FILE);
$result = $MOD_SHA->new(256)->addfile(*FILE)->hexdigest;
close(FILE);
@ -401,9 +401,9 @@ my $currentdate = scalar gmtime($filedate);
my $format = $opt_t ? "plain text and " : "";
if($stdout) {
open(CRT, '> -') or die "Couldn't open STDOUT: $!\n";
open(CRT, '> -') or die "Could not open STDOUT: $!\n";
} else {
open(CRT,">$crt.~") or die "Couldn't open $crt.~: $!\n";
open(CRT,">$crt.~") or die "Could not open $crt.~: $!\n";
}
print CRT <<EOT;
##
@ -442,7 +442,7 @@ my @precert;
my $cka_value;
my $valid = 0;
open(TXT,"$txt") or die "Couldn't open $txt: $!\n";
open(TXT,"$txt") or die "Could not open $txt: $!\n";
while(<TXT>) {
if(/\*\*\*\*\* BEGIN LICENSE BLOCK \*\*\*\*\*/) {
print CRT;
@ -629,25 +629,25 @@ while(<TXT>) {
$pipe = "|$openssl x509 -" . $hash . " -fingerprint -noout -inform PEM";
if(!$stdout) {
$pipe .= " >> $crt.~";
close(CRT) or die "Couldn't close $crt.~: $!";
close(CRT) or die "Could not close $crt.~: $!";
}
open(TMP, $pipe) or die "Couldn't open openssl pipe: $!";
open(TMP, $pipe) or die "Could not open openssl pipe: $!";
print TMP $pem;
close(TMP) or die "Couldn't close openssl pipe: $!";
close(TMP) or die "Could not close openssl pipe: $!";
if(!$stdout) {
open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!";
open(CRT, ">>$crt.~") or die "Could not open $crt.~: $!";
}
}
$pipe = "|$openssl x509 -text -inform PEM";
if(!$stdout) {
$pipe .= " >> $crt.~";
close(CRT) or die "Couldn't close $crt.~: $!";
close(CRT) or die "Could not close $crt.~: $!";
}
open(TMP, $pipe) or die "Couldn't open openssl pipe: $!";
open(TMP, $pipe) or die "Could not open openssl pipe: $!";
print TMP $pem;
close(TMP) or die "Couldn't close openssl pipe: $!";
close(TMP) or die "Could not close openssl pipe: $!";
if(!$stdout) {
open(CRT, ">>$crt.~") or die "Couldn't open $crt.~: $!";
open(CRT, ">>$crt.~") or die "Could not open $crt.~: $!";
}
}
report "Processed: $caname" if($opt_v);
@ -655,8 +655,8 @@ while(<TXT>) {
}
}
}
close(TXT) or die "Couldn't close $txt: $!\n";
close(CRT) or die "Couldn't close $crt.~: $!\n";
close(TXT) or die "Could not close $txt: $!\n";
close(CRT) or die "Could not close $crt.~: $!\n";
unless($stdout) {
if($opt_b && -e $crt) {
my $bk = 1;