From 301d70dae8283d24283cb31bff937b91ec5c8630 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Sat, 25 Mar 2023 22:58:18 +0100 Subject: [PATCH] perlPackages.Plack: add patch to avoid DES encrypted passwords in tests --- .../Plack-test-replace-DES-hash-with-bcrypt.patch | 12 ++++++++++++ pkgs/top-level/perl-packages.nix | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 pkgs/development/perl-modules/Plack-test-replace-DES-hash-with-bcrypt.patch diff --git a/pkgs/development/perl-modules/Plack-test-replace-DES-hash-with-bcrypt.patch b/pkgs/development/perl-modules/Plack-test-replace-DES-hash-with-bcrypt.patch new file mode 100644 index 000000000000..4f9918a5eeae --- /dev/null +++ b/pkgs/development/perl-modules/Plack-test-replace-DES-hash-with-bcrypt.patch @@ -0,0 +1,12 @@ +Replaces the legacy DES crypt hash used in tests with a stronger +bcrypt function, as crypt() in pkgs.perl no longer supports DES + +# htpasswd -nbB admin s3cr3t + +diff --git a/t/Plack-Middleware/htpasswd b/t/Plack-Middleware/htpasswd +index b597da8..f80461d 100644 +--- a/t/Plack-Middleware/htpasswd ++++ b/t/Plack-Middleware/htpasswd +@@ -1,1 +1,1 @@ +-admin:6iSeSVcVHgNQw ++admin:$2y$05$qO4lTUQMcE5mU6KI0t7j9uCjcTkpf6sAp0cv6oZiemD0MI8keeKPa diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 59b488bc018e..8b466e0ae38d 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -19593,6 +19593,9 @@ let }; buildInputs = [ AuthenSimplePasswd CGIEmulatePSGI FileShareDirInstall HTTPRequestAsCGI HTTPServerSimplePSGI IOHandleUtil LWP LWPProtocolhttp10 LogDispatchArray MIMETypes TestMockTimeHiRes TestRequires TestSharedFork TestTCP ]; propagatedBuildInputs = [ ApacheLogFormatCompiler CookieBaker DevelStackTraceAsHTML FileShareDir FilesysNotifySimple HTTPEntityParser HTTPHeadersFast HTTPMessage TryTiny ]; + patches = [ + ../development/perl-modules/Plack-test-replace-DES-hash-with-bcrypt.patch + ]; meta = { description = "Perl Superglue for Web frameworks and Web Servers (PSGI toolkit)"; homepage = "https://github.com/plack/Plack";