Skip to content

Commit 98a31cd

Browse files
authored
wordpress: 6.6.1 -> 6.6.2 (#343013)
2 parents b8cca11 + d582ac0 commit 98a31cd

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

nixos/modules/services/web-apps/wordpress.nix

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,16 @@ let
7575

7676
mkPhpValue = v: let
7777
isHasAttr = s: isAttrs v && hasAttr s v;
78+
# "you're escaped" -> "'you\'re escaped'"
79+
# https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.single
80+
toPhpString = s: "'${escape [ "'" "\\" ] s}'";
7881
in
79-
if isString v then escapeShellArg v
82+
if isString v then toPhpString v
8083
# NOTE: If any value contains a , (comma) this will not get escaped
81-
else if isList v && any lib.strings.isCoercibleToString v then escapeShellArg (concatMapStringsSep "," toString v)
84+
else if isList v && any lib.strings.isCoercibleToString v then toPhpString (concatMapStringsSep "," toString v)
8285
else if isInt v then toString v
8386
else if isBool v then boolToString v
84-
else if isHasAttr "_file" then "trim(file_get_contents(${lib.escapeShellArg v._file}))"
87+
else if isHasAttr "_file" then "trim(file_get_contents(${toPhpString v._file}))"
8588
else if isHasAttr "_raw" then v._raw
8689
else abort "The Wordpress config value ${lib.generators.toPretty {} v} can not be encoded."
8790
;

nixos/tests/wordpress.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ rec {
1111
};
1212

1313
nodes = lib.foldl (a: version: let
14-
package = pkgs."wordpress${version}";
14+
package = pkgs."wordpress_${version}";
1515
in a // {
1616
"wp${version}_httpd" = _: {
1717
services.httpd.adminAddr = "[email protected]";
@@ -67,7 +67,7 @@ rec {
6767
networking.hosts."127.0.0.1" = [ "site1.local" "site2.local" ];
6868
};
6969
}) {} [
70-
"6_3" "6_4"
70+
"6_5" "6_6"
7171
];
7272

7373
testScript = ''

pkgs/servers/web-apps/wordpress/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
hash = "sha256-bIRmTqmzIRo1KdhAcJa1GxhVcTEiEaLFPzlNFbzfLcQ=";
66
};
77
wordpress_6_6 = {
8-
version = "6.6.1";
9-
hash = "sha256-YW6BhlP48okxLrpsJwPgynSHpbdRqyMoXaq9IBd8TlU=";
8+
version = "6.6.2";
9+
hash = "sha256-JpemjLPc9IP0/OiASSVpjHRmQBs2n8Mt4nB6WcTCB9Y=";
1010
};
1111
}

0 commit comments

Comments
 (0)