Merge #223180: perlPackages.{AuthenHtpasswd,CatalystAuthenticationStoreHtpasswd}: Fix libxcrypt DES

...into staging-next
This commit is contained in:
Vladimír Čunát 2023-03-26 08:23:51 +02:00
commit 0a9aa49814
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
2 changed files with 19 additions and 0 deletions

View file

@ -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 mufasa "Circle of Life"
diff --git a/t/lib/TestApp/htpasswd b/t/lib/TestApp/htpasswd
index 6cec784..91e5375 100644
--- a/t/lib/TestApp/htpasswd
+++ b/t/lib/TestApp/htpasswd
@@ -1 +1 @@
-mufasa:Y7hn4ncIVPOuI
+mufasa:$2y$05$.KPC4Gja9L5AxJATDQBzs.lCHkm49l/9dcoyPcJg0JhyIvsD6Gqza

View file

@ -1180,6 +1180,10 @@ let
hash = "sha256-tfr0fj+UikUoEGzLiMxxBIz+WY5bAmpEQ2i8fjk0gGc=";
};
propagatedBuildInputs = [ ClassAccessor CryptPasswdMD5 DigestSHA1 IOLockedFile ];
# Remove test files that fail after DES support was removed from crypt()
postPatch = ''
rm t/04core.t t/05edit.t
'';
meta = {
description = "Interface to read and modify Apache .htpasswd files";
license = with lib.licenses; [ artistic1 gpl1Plus ];
@ -2252,6 +2256,9 @@ let
};
buildInputs = [ ModuleBuildTiny TestLongString TestSimple13 TestWWWMechanize TestWWWMechanizeCatalyst ];
propagatedBuildInputs = [ AuthenHtpasswd CatalystPluginAuthentication ];
patches = [
../development/perl-modules/CatalystAuthenticationStoreHtpasswd-test-replace-DES-hash-with-bcrypt.patch
];
meta = {
description = "Authen::Htpasswd based user storage/authentication";
license = with lib.licenses; [ artistic1 gpl1Plus ];