Merge pull request #266746 from serpent213/patch-2

nixos/roundcube: Ignore newline at end of password file
This commit is contained in:
Emily Trau 2023-12-01 15:50:05 +11:00 committed by GitHub
commit 7edd128431
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,7 +120,7 @@ in
${lib.optionalString (!localDB) ''
$password = file('${cfg.database.passwordFile}')[0];
$password = preg_split('~\\\\.(*SKIP)(*FAIL)|\:~s', $password);
$password = end($password);
$password = rtrim(end($password));
$password = str_replace("\\:", ":", $password);
$password = str_replace("\\\\", "\\", $password);
''}