Quellcode durchsuchen

Require the Trog::TOTP that encodes with MIME::Base32, and stop asking for the XS one

tCMS listed MIME::Base32::XS so that the TOTP code, which once loaded it if
it could, would get the fast encoder.  Trog::TOTP 1.007 encodes with the
pure perl MIME::Base32, which it now requires itself, and nothing in tCMS
uses a base32 module directly.  MIME::Base32::XS corrupted the heap on an
ordinary 32 character secret, and it pads its output, so it is dropped, and
.preferred_modules.ini points at MIME::Base32 instead of it and of
Encode::Base2N, which Trog::TOTP used before and which needs a C++ build
that cpm cannot install.

The PreferredModules policy with this profile reports a use of either
module and leaves MIME::Base32 alone.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
George Baugh vor 1 Monat
Ursprung
Commit
f30c7aebcd
2 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen
  1. 5 0
      .preferred_modules.ini
  2. 1 2
      Makefile.PL

+ 5 - 0
.preferred_modules.ini

@@ -19,3 +19,8 @@ reason = "Avoid mangling files with concurrent writes"
 [perl/rand]
 prefer = Crypt::PRNG
 reason = builtin rand() insecure
+
+[MIME::Base32::XS]
+[Encode::Base2N]
+prefer = MIME::Base32
+reason = "MIME::Base32::XS corrupts the heap and pads its output, and Encode::Base2N needs a C++ build that cpm cannot install"

+ 1 - 2
Makefile.PL

@@ -20,7 +20,7 @@ WriteMakefile(
         },
     },
     PREREQ_PM => {
-        'Trog::TOTP'                          => '0',
+        'Trog::TOTP'                          => '1.007',
         'CGI::Cookie'                         => '0',
         'Capture::Tiny'                       => '0',
         'Carp'                                => '0',
@@ -71,7 +71,6 @@ WriteMakefile(
         'Log::Dispatch'                       => '0',
         'Log::Dispatch::FileRotate'           => '0',
         'Digest::SHA'                         => '0',
-        'MIME::Base32::XS'                    => '0',
         'URI'                                 => '0',
         'FindBin::libs'                       => '0',
         'Carp::Always'                        => '0',